test-unit-must 0.0.1 → 0.0.2
Sign up to get free protection for your applications and to get access to all the features.
- data/README.md +1 -2
- data/lib/test/unit/must.rb +10 -8
- metadata +2 -2
data/README.md
CHANGED
@@ -11,7 +11,7 @@ Compatibility
|
|
11
11
|
|
12
12
|
test-unit-must was designed for [Test::Unit] 2.2.0. However, I found that it
|
13
13
|
works just as well with the MiniTest library bundled in Ruby 1.9.2! :-) In
|
14
|
-
addition, it politely
|
14
|
+
addition, it politely accommodates [Rails 3's ActiveSupport extensions to
|
15
15
|
Test::Unit](
|
16
16
|
http://rails.rubyonrails.org/classes/ActiveSupport/Testing/SetupAndTeardown/ForClassicTestUnit.html).
|
17
17
|
|
@@ -183,5 +183,4 @@ License
|
|
183
183
|
Released under the ISC license. See the `lib/test/unit/must.rb` file.
|
184
184
|
|
185
185
|
[Test::Unit]: http://test-unit.rubyforge.org/
|
186
|
-
[MiniTest]: http://rubydoc.info/stdlib/minitest/
|
187
186
|
[MiniTest::Spec]: http://rubydoc.info/stdlib/minitest/
|
data/lib/test/unit/must.rb
CHANGED
@@ -219,15 +219,17 @@ module Test::Unit::Must
|
|
219
219
|
:assert_true, self, message
|
220
220
|
end
|
221
221
|
|
222
|
-
#
|
223
|
-
#
|
224
|
-
|
225
|
-
if method =~ /^
|
226
|
-
|
227
|
-
|
222
|
+
# define negative versions of positive assertion
|
223
|
+
# methods as needed to fill the gaps in this API
|
224
|
+
instance_methods(false).each do |method|
|
225
|
+
if method =~ /^must_(?!not_)/
|
226
|
+
unless method_defined? negative = 'must_not_' + $'
|
227
|
+
define_method negative do |*arguments, &block|
|
228
|
+
$ebb6cc8f_e966_4d1f_969f_530ea365eb36.send :assert_fail_assertion do
|
229
|
+
__send__ method, *arguments, &block
|
230
|
+
end
|
231
|
+
end
|
228
232
|
end
|
229
|
-
else
|
230
|
-
super
|
231
233
|
end
|
232
234
|
end
|
233
235
|
end
|
metadata
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
name: test-unit-must
|
3
3
|
version: !ruby/object:Gem::Version
|
4
4
|
prerelease:
|
5
|
-
version: 0.0.
|
5
|
+
version: 0.0.2
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
8
8
|
- Suraj N. Kurapati
|
@@ -10,7 +10,7 @@ autorequire:
|
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
12
|
|
13
|
-
date: 2011-
|
13
|
+
date: 2011-04-04 00:00:00 -07:00
|
14
14
|
default_executable:
|
15
15
|
dependencies: []
|
16
16
|
|