minitest-filesystem 0.1.0 → 1.0.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 06e28053de722c8cc02a8e8679ec05b41fe86e39
4
- data.tar.gz: f8e11b3bd7ff63311b7699a9f739f7e91bcac9d1
3
+ metadata.gz: 5edb0d40a8fe405e13d768d35eebcd0a42ebdfad
4
+ data.tar.gz: 8659eb65331a821a571ef3aa458fa20f639622b1
5
5
  SHA512:
6
- metadata.gz: 5375f8b89900b5e6a05eb32289cb8aaf4bf2e144ccf302890dcbd08958f1e8b7d93bdea120be1ebbd22b1fc0fdee7a3134d69d0ff34fc95a9017786ab165d69c
7
- data.tar.gz: d58bdf3707630ca24a3a26901bcbff36aaf19439e8e9eadbca43e5d40629db6743acacf6fb66d7acdc126151279cf3e2959523b05567b709bacc863b68432a67
6
+ metadata.gz: 24258a794d7def3488c1b13d8c298fe4937f74de30fb048165f5b069b16738e3ae7f59b1947d6808ca1199fc5862822091bbdeaedcb592f5d9710a7bc6928de1
7
+ data.tar.gz: f06f66341d1ff128c1f4eb532e4019902c8dd577eaeadea944759cbcb182399700c286f8ccbd1a4279b149429446e6da8a59c22003027eeb05004af0c9b2164e
data/.travis.yml CHANGED
@@ -2,9 +2,12 @@
2
2
  language: ruby
3
3
 
4
4
  rvm:
5
+ - 1.8.7
5
6
  - 1.9.3
6
7
  - 2.0.0
8
+ - jruby-18mode
7
9
  - jruby-19mode
10
+ - rbx-18mode
8
11
  - rbx-19mode
9
12
 
10
13
  bundler_args: --path vendor/bundle
data/README.md CHANGED
@@ -86,3 +86,7 @@ directories inside `root_dir` that the matcher won't care about).
86
86
  * Refactor existing code
87
87
  * Add more tests around assertion
88
88
  * Infect `must_exist_within` expectation
89
+
90
+ ### 1.0.0
91
+
92
+ * Add support for Ruby 1.8.
@@ -10,13 +10,13 @@ module MiniTest
10
10
  end
11
11
 
12
12
  def file(file)
13
- entry(:file, file) && is_a?(:file, file)
13
+ entry(file, :file) && is_a?(file, :file)
14
14
  end
15
15
 
16
16
  def dir(dir, &block)
17
17
  matcher = self.class.new(@actual_tree.expand_path(dir), &block) if block_given?
18
18
 
19
- entry(:directory, dir) && is_a?(:directory, dir) && subtree(matcher)
19
+ entry(dir, :directory) && is_a?(dir, :directory) && subtree(matcher)
20
20
  end
21
21
 
22
22
  def match_found?
@@ -30,20 +30,20 @@ module MiniTest
30
30
 
31
31
  private
32
32
 
33
- def entry(kind = :entry, entry)
33
+ def entry(entry, kind=:entry)
34
34
  update_matching_status(
35
35
  @actual_tree.include?(entry),
36
- not_found_msg_for(kind, entry))
36
+ not_found_msg_for(entry, kind))
37
37
  end
38
38
 
39
39
  def subtree(matcher)
40
40
  update_matching_status(matcher.match_found?, matcher.message) if matcher
41
41
  end
42
42
 
43
- def is_a?(kind, entry)
43
+ def is_a?(entry, kind)
44
44
  update_matching_status(
45
- @actual_tree.is_a?(kind, entry),
46
- mismatch_msg_for(kind, entry))
45
+ @actual_tree.is_a?(entry, kind),
46
+ mismatch_msg_for(entry, kind))
47
47
  end
48
48
 
49
49
  def update_matching_status(check, msg)
@@ -53,11 +53,11 @@ module MiniTest
53
53
  @is_matching
54
54
  end
55
55
 
56
- def not_found_msg_for(kind, entry)
56
+ def not_found_msg_for(entry, kind)
57
57
  "Expected `#{@actual_tree.root}` to contain #{kind} `#{entry}`."
58
58
  end
59
59
 
60
- def mismatch_msg_for(kind, entry)
60
+ def mismatch_msg_for(entry, kind)
61
61
  "Expected `#{entry}` to be a #{kind}, but it was not."
62
62
  end
63
63
 
@@ -77,7 +77,7 @@ module MiniTest
77
77
  @tree.include?(expand_path(entry))
78
78
  end
79
79
 
80
- def is_a?(kind, entry)
80
+ def is_a?(entry, kind)
81
81
  (expand_path entry).send("#{kind}?")
82
82
  end
83
83
 
@@ -1,5 +1,5 @@
1
1
  module Minitest
2
2
  module Filesystem
3
- VERSION = "0.1.0"
3
+ VERSION = "1.0.0"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: minitest-filesystem
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 1.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Stefano Zanella