minitest-filesystem 1.0.0 → 1.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +8 -4
- data/lib/minitest/filesystem/matcher.rb +2 -2
- data/lib/minitest/filesystem/version.rb +1 -1
- data/lib/minitest/filesystem.rb +3 -3
- data/test/assertion_test.rb +6 -6
- data/test/expectation_test.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8147560c2e1b553781d1fe64aa3d16922e660fbb
|
4
|
+
data.tar.gz: fcf37de46bdce50cd7021be4b3fb59a3c7d00b28
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 405554b5210ed89120068bb0e596c35b026323741ff91321fd6f96daab54f05d218e5bd41f99c313e27f1ac6bc297f769a1ca20921ad4d66665256df0749363c
|
7
|
+
data.tar.gz: bb04b93b924a0f67d284a19ded922f76c660182bf5210c924fa73405d7d51f5c66c6b61071a74a3c47edf1ef1e22b2ed99a89784881f720fe185ab90bba78b67
|
data/README.md
CHANGED
@@ -77,9 +77,13 @@ directories inside `root_dir` that the matcher won't care about).
|
|
77
77
|
|
78
78
|
## Changelog
|
79
79
|
|
80
|
-
###
|
80
|
+
### 1.0.1
|
81
81
|
|
82
|
-
*
|
82
|
+
* Remove CamelCase naming.
|
83
|
+
|
84
|
+
### 1.0.0
|
85
|
+
|
86
|
+
* Add support for Ruby 1.8.
|
83
87
|
|
84
88
|
### 0.1.0
|
85
89
|
|
@@ -87,6 +91,6 @@ directories inside `root_dir` that the matcher won't care about).
|
|
87
91
|
* Add more tests around assertion
|
88
92
|
* Infect `must_exist_within` expectation
|
89
93
|
|
90
|
-
###
|
94
|
+
### 0.0.1
|
91
95
|
|
92
|
-
*
|
96
|
+
* Extract assertion and matcher from current projects
|
data/lib/minitest/filesystem.rb
CHANGED
@@ -1,9 +1,9 @@
|
|
1
1
|
require "minitest/filesystem/version"
|
2
2
|
require "minitest/filesystem/matcher"
|
3
3
|
|
4
|
-
module
|
4
|
+
module Minitest::Assertions
|
5
5
|
def assert_contains_filesystem(dir, msg = nil, &block)
|
6
|
-
matcher =
|
6
|
+
matcher = Minitest::Filesystem::Matcher.new(dir, &block)
|
7
7
|
assert matcher.match_found?, msg || matcher.message
|
8
8
|
end
|
9
9
|
|
@@ -12,6 +12,6 @@ module MiniTest::Assertions
|
|
12
12
|
end
|
13
13
|
end
|
14
14
|
|
15
|
-
module
|
15
|
+
module Minitest::Expectations
|
16
16
|
infect_an_assertion :assert_contains_filesystem, :must_exist_within
|
17
17
|
end
|
data/test/assertion_test.rb
CHANGED
@@ -54,7 +54,7 @@ describe "assert_contains_filesystem" do
|
|
54
54
|
file "foo"
|
55
55
|
end }
|
56
56
|
|
57
|
-
error = assert_raises(
|
57
|
+
error = assert_raises(Minitest::Assertion, &l)
|
58
58
|
error.message.must_match(/expected `#{@root_dir}` to contain file `foo`/im)
|
59
59
|
end
|
60
60
|
|
@@ -63,7 +63,7 @@ describe "assert_contains_filesystem" do
|
|
63
63
|
dir "bar"
|
64
64
|
end }
|
65
65
|
|
66
|
-
error = assert_raises(
|
66
|
+
error = assert_raises(Minitest::Assertion, &l)
|
67
67
|
error.message.must_match(/expected `#{@root_dir}` to contain directory `bar`/im)
|
68
68
|
end
|
69
69
|
|
@@ -74,7 +74,7 @@ describe "assert_contains_filesystem" do
|
|
74
74
|
end
|
75
75
|
end }
|
76
76
|
|
77
|
-
error = assert_raises(
|
77
|
+
error = assert_raises(Minitest::Assertion, &l)
|
78
78
|
error.message.must_match(
|
79
79
|
/expected `#{@root_dir + 'a_subdirectory'}` to contain file `missing_file`/im)
|
80
80
|
end
|
@@ -84,7 +84,7 @@ describe "assert_contains_filesystem" do
|
|
84
84
|
file "not_a_file"
|
85
85
|
end }
|
86
86
|
|
87
|
-
error = assert_raises(
|
87
|
+
error = assert_raises(Minitest::Assertion, &l)
|
88
88
|
error.message.must_match(/expected `not_a_file` to be a file/im)
|
89
89
|
end
|
90
90
|
|
@@ -93,7 +93,7 @@ describe "assert_contains_filesystem" do
|
|
93
93
|
dir "not_a_dir"
|
94
94
|
end }
|
95
95
|
|
96
|
-
error = assert_raises(
|
96
|
+
error = assert_raises(Minitest::Assertion, &l)
|
97
97
|
error.message.must_match(/expected `not_a_dir` to be a directory/im)
|
98
98
|
end
|
99
99
|
|
@@ -104,7 +104,7 @@ describe "assert_contains_filesystem" do
|
|
104
104
|
file "baz"
|
105
105
|
end }
|
106
106
|
|
107
|
-
error = assert_raises(
|
107
|
+
error = assert_raises(Minitest::Assertion, &l)
|
108
108
|
error.message.must_equal(failure_msg)
|
109
109
|
end
|
110
110
|
end
|
data/test/expectation_test.rb
CHANGED
@@ -41,7 +41,7 @@ describe "filesystem must_exist_within" do
|
|
41
41
|
file "missing_file"
|
42
42
|
}.must_exist_within(@root_dir) }
|
43
43
|
|
44
|
-
error = assert_raises(
|
44
|
+
error = assert_raises(Minitest::Assertion, &l)
|
45
45
|
error.message.must_match(
|
46
46
|
/expected `#{@root_dir}` to contain file `missing_file`/im)
|
47
47
|
end
|