test-unit-must 0.1.0 → 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/README.md +11 -13
- data/lib/test/unit/must.rb +2 -2
- 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
|
4
|
-
|
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
|
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
|
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
|
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
|
150
|
+
assert_path_exist self, message
|
153
151
|
|
154
152
|
def must_not_exist_in_filesystem message=nil
|
155
|
-
assert_path_not_exist
|
153
|
+
assert_path_not_exist self, message
|
156
154
|
|
157
155
|
def must_predicate predicate, message=nil
|
158
|
-
assert_predicate
|
156
|
+
assert_predicate self, predicate, message
|
159
157
|
|
160
158
|
def must_not_predicate predicate, message=nil
|
161
|
-
assert_not_predicate
|
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
|
179
|
+
def must_accept send_array, message=nil
|
182
180
|
assert_send [self] + send_array, message
|
183
181
|
|
184
|
-
def
|
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
|
data/lib/test/unit/must.rb
CHANGED
@@ -219,12 +219,12 @@ module Test::Unit::Must
|
|
219
219
|
:assert_not_same, expected, self, message
|
220
220
|
end
|
221
221
|
|
222
|
-
def
|
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
|
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
|