matchbox 1.0.1 → 1.0.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. data/lib/matchbox.rb +6 -2
  2. data/lib/matchbox/version.rb +1 -1
  3. metadata +61 -70
@@ -24,7 +24,9 @@ module Matchbox
24
24
  # @raises [Test::Unit::AssertionFailedError] if the assertion fails
25
25
  def assert_accepts(matcher, target)
26
26
  matched = matcher.matches?(target)
27
- assert_block(matcher.failure_message) { matched }
27
+ message = matcher.failure_message
28
+
29
+ message ? assert(matched, message) : assert(matched)
28
30
  end
29
31
 
30
32
  # Asserts that a matcher does not match a given target.
@@ -34,7 +36,9 @@ module Matchbox
34
36
  # @raises [Test::Unit::AssertionFailedError] if the assertion fails
35
37
  def assert_rejects(matcher, target)
36
38
  matched = matcher.matches?(target)
37
- assert_block(matcher.negative_failure_message) { !matched }
39
+ message = matcher.negative_failure_message
40
+
41
+ message ? assert(!matched, message) : assert(!matched)
38
42
  end
39
43
  end
40
44
 
@@ -1,3 +1,3 @@
1
1
  module Matchbox
2
- VERSION = '1.0.1'
2
+ VERSION = '1.0.2'
3
3
  end
metadata CHANGED
@@ -1,83 +1,78 @@
1
- --- !ruby/object:Gem::Specification
1
+ --- !ruby/object:Gem::Specification
2
2
  name: matchbox
3
- version: !ruby/object:Gem::Version
3
+ version: !ruby/object:Gem::Version
4
+ version: 1.0.2
4
5
  prerelease:
5
- version: 1.0.1
6
6
  platform: ruby
7
- authors:
7
+ authors:
8
8
  - Alexander Kern
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
-
13
- date: 2011-05-12 00:00:00 -07:00
14
- default_executable:
15
- dependencies:
16
- - !ruby/object:Gem::Dependency
12
+ date: 2011-09-19 00:00:00.000000000Z
13
+ dependencies:
14
+ - !ruby/object:Gem::Dependency
17
15
  name: test-unit
18
- prerelease: false
19
- requirement: &id001 !ruby/object:Gem::Requirement
16
+ requirement: &70360587744240 !ruby/object:Gem::Requirement
20
17
  none: false
21
- requirements:
22
- - - ">="
23
- - !ruby/object:Gem::Version
24
- version: "0"
18
+ requirements:
19
+ - - ! '>='
20
+ - !ruby/object:Gem::Version
21
+ version: '0'
25
22
  type: :development
26
- version_requirements: *id001
27
- - !ruby/object:Gem::Dependency
28
- name: contest
29
23
  prerelease: false
30
- requirement: &id002 !ruby/object:Gem::Requirement
24
+ version_requirements: *70360587744240
25
+ - !ruby/object:Gem::Dependency
26
+ name: contest
27
+ requirement: &70360587743800 !ruby/object:Gem::Requirement
31
28
  none: false
32
- requirements:
33
- - - ">="
34
- - !ruby/object:Gem::Version
35
- version: "0"
29
+ requirements:
30
+ - - ! '>='
31
+ - !ruby/object:Gem::Version
32
+ version: '0'
36
33
  type: :development
37
- version_requirements: *id002
38
- - !ruby/object:Gem::Dependency
39
- name: mocha
40
34
  prerelease: false
41
- requirement: &id003 !ruby/object:Gem::Requirement
35
+ version_requirements: *70360587743800
36
+ - !ruby/object:Gem::Dependency
37
+ name: mocha
38
+ requirement: &70360587743160 !ruby/object:Gem::Requirement
42
39
  none: false
43
- requirements:
44
- - - ">="
45
- - !ruby/object:Gem::Version
46
- version: "0"
40
+ requirements:
41
+ - - ! '>='
42
+ - !ruby/object:Gem::Version
43
+ version: '0'
47
44
  type: :development
48
- version_requirements: *id003
49
- - !ruby/object:Gem::Dependency
50
- name: yard
51
45
  prerelease: false
52
- requirement: &id004 !ruby/object:Gem::Requirement
46
+ version_requirements: *70360587743160
47
+ - !ruby/object:Gem::Dependency
48
+ name: yard
49
+ requirement: &70360587742740 !ruby/object:Gem::Requirement
53
50
  none: false
54
- requirements:
55
- - - ">="
56
- - !ruby/object:Gem::Version
57
- version: "0"
51
+ requirements:
52
+ - - ! '>='
53
+ - !ruby/object:Gem::Version
54
+ version: '0'
58
55
  type: :development
59
- version_requirements: *id004
60
- - !ruby/object:Gem::Dependency
61
- name: maruku
62
56
  prerelease: false
63
- requirement: &id005 !ruby/object:Gem::Requirement
57
+ version_requirements: *70360587742740
58
+ - !ruby/object:Gem::Dependency
59
+ name: maruku
60
+ requirement: &70360587742280 !ruby/object:Gem::Requirement
64
61
  none: false
65
- requirements:
66
- - - ">="
67
- - !ruby/object:Gem::Version
68
- version: "0"
62
+ requirements:
63
+ - - ! '>='
64
+ - !ruby/object:Gem::Version
65
+ version: '0'
69
66
  type: :development
70
- version_requirements: *id005
67
+ prerelease: false
68
+ version_requirements: *70360587742280
71
69
  description: Adds Test::Unit assertions for RSpec and Shoulda matchers
72
- email:
70
+ email:
73
71
  - alex@kernul.com
74
72
  executables: []
75
-
76
73
  extensions: []
77
-
78
74
  extra_rdoc_files: []
79
-
80
- files:
75
+ files:
81
76
  - .gitignore
82
77
  - .travis.yml
83
78
  - .yardopts
@@ -90,34 +85,30 @@ files:
90
85
  - matchbox.gemspec
91
86
  - test/test_helper.rb
92
87
  - test/test_matchbox.rb
93
- has_rdoc: true
94
88
  homepage: https://github.com/CapnKernul/matchbox
95
89
  licenses: []
96
-
97
90
  post_install_message:
98
91
  rdoc_options: []
99
-
100
- require_paths:
92
+ require_paths:
101
93
  - lib
102
- required_ruby_version: !ruby/object:Gem::Requirement
94
+ required_ruby_version: !ruby/object:Gem::Requirement
103
95
  none: false
104
- requirements:
105
- - - ">="
106
- - !ruby/object:Gem::Version
107
- version: "0"
108
- required_rubygems_version: !ruby/object:Gem::Requirement
96
+ requirements:
97
+ - - ! '>='
98
+ - !ruby/object:Gem::Version
99
+ version: '0'
100
+ required_rubygems_version: !ruby/object:Gem::Requirement
109
101
  none: false
110
- requirements:
111
- - - ">="
112
- - !ruby/object:Gem::Version
113
- version: "0"
102
+ requirements:
103
+ - - ! '>='
104
+ - !ruby/object:Gem::Version
105
+ version: '0'
114
106
  requirements: []
115
-
116
107
  rubyforge_project: matchbox
117
- rubygems_version: 1.6.2
108
+ rubygems_version: 1.8.10
118
109
  signing_key:
119
110
  specification_version: 3
120
111
  summary: Use RSpec and Shoulda matchers in Test::Unit
121
- test_files:
112
+ test_files:
122
113
  - test/test_helper.rb
123
114
  - test/test_matchbox.rb