summaryrefslogtreecommitdiff
path: root/testing/tests
diff options
context:
space:
mode:
authorAdam Carpenter <53hornet@gmail.com>2019-02-19 17:08:00 -0500
committerAdam Carpenter <53hornet@gmail.com>2019-02-19 17:08:00 -0500
commit7d5500f62c1eb316682d6c8de314d2b181c5248a (patch)
treebb83c621c03dfc08cd56384305b4e72fc4bbe47c /testing/tests
parenta48940b60367f94c50b6782d8883110b76a356e8 (diff)
downloadlearning-rust-7d5500f62c1eb316682d6c8de314d2b181c5248a.tar.xz
learning-rust-7d5500f62c1eb316682d6c8de314d2b181c5248a.zip
Added minigrep.
Diffstat (limited to 'testing/tests')
-rw-r--r--testing/tests/common/mod.rs3
-rw-r--r--testing/tests/integration_test.rs4
2 files changed, 6 insertions, 1 deletions
diff --git a/testing/tests/common/mod.rs b/testing/tests/common/mod.rs
new file mode 100644
index 0000000..c00b3a6
--- /dev/null
+++ b/testing/tests/common/mod.rs
@@ -0,0 +1,3 @@
+pub fn setup() {
+ // setup code
+}
diff --git a/testing/tests/integration_test.rs b/testing/tests/integration_test.rs
index e0dbe08..ce04ce3 100644
--- a/testing/tests/integration_test.rs
+++ b/testing/tests/integration_test.rs
@@ -1,7 +1,9 @@
use testing;
+mod common;
#[test]
fn it_adds_two() {
- assert_eq!(4, testing::add_two(2));
+ common::setup();
+ assert_eq!(4, testing::add_two(2));
}