test-unit-must 0.1.0 → 1.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. data/README.md +11 -13
  2. data/lib/test/unit/must.rb +2 -2
  3. metadata +1 -1
data/README.md CHANGED
@@ -1,9 +1,7 @@
1
1
  # test-unit-must - Selfish "must" assertions for Test::Unit
2
2
 
3
- test-unit-must is a set of assertions for [Test::Unit] that treat the receiver
4
- of an assertion method call as the subject of the assertion. In other words,
5
- these are [MiniTest::Spec]-style assertions, but their names only begin with
6
- `must_` or `must_not_`; there is no `wont_` or `refute_` prefix.
3
+ test-unit-must adds object-oriented "must" aliases to [Test::Unit] assertions
4
+ following [MiniTest::Spec] style except for replacing "wont" with "must_not".
7
5
 
8
6
  ------------------------------------------------------------------------------
9
7
  Compatibility
@@ -71,13 +69,13 @@ Reference
71
69
  Here is the mapping from test-unit-must assertions to [Test::Unit] assertions.
72
70
 
73
71
  def must_be_truth message=nil
74
- assert, self, message
72
+ assert self, message
75
73
 
76
74
  def must_alias_method alias_name, original_name, message=nil
77
75
  assert_alias_method self, alias_name, original_name, message
78
76
 
79
77
  def must_yield_truth message=nil
80
- assert_block, message, &self
78
+ assert_block message, &self
81
79
 
82
80
  def must_be_boolean message=nil
83
81
  assert_boolean self, message
@@ -104,7 +102,7 @@ Here is the mapping from test-unit-must assertions to [Test::Unit] assertions.
104
102
  assert_not_equal expected, self, message
105
103
 
106
104
  def must_fail message=nil
107
- assert_fail_assertion, message, &self
105
+ assert_fail_assertion message, &self
108
106
 
109
107
  def must_be_false message=nil
110
108
  assert_false self, message
@@ -149,16 +147,16 @@ Here is the mapping from test-unit-must assertions to [Test::Unit] assertions.
149
147
  assert_operator self, operator, argument, message
150
148
 
151
149
  def must_exist_in_filesystem message=nil
152
- assert_path_exist, self, message
150
+ assert_path_exist self, message
153
151
 
154
152
  def must_not_exist_in_filesystem message=nil
155
- assert_path_not_exist, self, message
153
+ assert_path_not_exist self, message
156
154
 
157
155
  def must_predicate predicate, message=nil
158
- assert_predicate, self, predicate, message
156
+ assert_predicate self, predicate, message
159
157
 
160
158
  def must_not_predicate predicate, message=nil
161
- assert_not_predicate, self, predicate, message
159
+ assert_not_predicate self, predicate, message
162
160
 
163
161
  def must_raise *arguments
164
162
  assert_raise *arguments, &self
@@ -178,10 +176,10 @@ Here is the mapping from test-unit-must assertions to [Test::Unit] assertions.
178
176
  def must_not_be expected, message=nil
179
177
  assert_not_same expected, self, message
180
178
 
181
- def must_receive send_array, message=nil
179
+ def must_accept send_array, message=nil
182
180
  assert_send [self] + send_array, message
183
181
 
184
- def must_not_receive send_array, message=nil
182
+ def must_not_accept send_array, message=nil
185
183
  assert_not_send [self] + send_array, message
186
184
 
187
185
  def must_respond_to method, message=nil
@@ -219,12 +219,12 @@ module Test::Unit::Must
219
219
  :assert_not_same, expected, self, message
220
220
  end
221
221
 
222
- def must_receive send_array, message=nil
222
+ def must_accept send_array, message=nil
223
223
  $ebb6cc8f_e966_4d1f_969f_530ea365eb36.send \
224
224
  :assert_send, [self] + send_array, message
225
225
  end
226
226
 
227
- def must_not_receive send_array, message=nil
227
+ def must_not_accept send_array, message=nil
228
228
  $ebb6cc8f_e966_4d1f_969f_530ea365eb36.send \
229
229
  :assert_not_send, [self] + send_array, message
230
230
  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.1.0
5
+ version: 1.0.0
6
6
  platform: ruby
7
7
  authors:
8
8
  - Suraj N. Kurapati