assertions 0.9.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/History.txt +4 -1
- data/README.txt +2 -2
- data/Rakefile +1 -1
- data/lib/assertions.rb +12 -11
- metadata +2 -2
data/History.txt
CHANGED
data/README.txt
CHANGED
@@ -9,10 +9,10 @@ including:
|
|
9
9
|
* Assertions for all of the comparison operators (assert_greater_than,
|
10
10
|
assert_less_than_or_equal_to, etc.). Shorter aliases also are provided
|
11
11
|
for these (assert_gt, assert_le, etc.).
|
12
|
-
* An assertion that
|
12
|
+
* An assertion that verifies that a given block raises a specified exception
|
13
13
|
with a specified message (assert_raise_message). This allows full testing
|
14
14
|
of error messages.
|
15
|
-
* An assertion that
|
15
|
+
* An assertion that verifies that a given block contains an assertion that
|
16
16
|
fails, which can be used to test new assertions.
|
17
17
|
|
18
18
|
== PROBLEMS:
|
data/Rakefile
CHANGED
data/lib/assertions.rb
CHANGED
@@ -15,13 +15,14 @@ module Assertions
|
|
15
15
|
# ====Description:
|
16
16
|
# This assertion passes if and only if block contains an assertion
|
17
17
|
# that fails (but which is suppressed from propagating outside of
|
18
|
-
# block
|
18
|
+
# block and so will not cause the test to fail).
|
19
|
+
# If the assertion passes, the failed assertion is written to
|
19
20
|
# stdout. This method is (only?) useful when testing other assertions.
|
20
21
|
#
|
21
22
|
# ====Example:
|
22
|
-
#
|
23
|
-
#
|
24
|
-
#
|
23
|
+
# assert_fail do
|
24
|
+
# assert_equal(5, 4)
|
25
|
+
# end
|
25
26
|
#
|
26
27
|
# ====Parameters:
|
27
28
|
# [message = ""]
|
@@ -53,7 +54,7 @@ module Assertions
|
|
53
54
|
# lhs > rhs.
|
54
55
|
#
|
55
56
|
# ====Example:
|
56
|
-
#
|
57
|
+
# assert_greater_than(5, 4)
|
57
58
|
#
|
58
59
|
# ====Parameters:
|
59
60
|
# [lhs]
|
@@ -75,7 +76,7 @@ module Assertions
|
|
75
76
|
# lhs >= rhs.
|
76
77
|
#
|
77
78
|
# ====Example:
|
78
|
-
#
|
79
|
+
# assert_greater_than_or_equal_to(5, 5)
|
79
80
|
#
|
80
81
|
# ====Parameters:
|
81
82
|
# [lhs]
|
@@ -97,7 +98,7 @@ module Assertions
|
|
97
98
|
# lhs < rhs.
|
98
99
|
#
|
99
100
|
# ====Example:
|
100
|
-
#
|
101
|
+
# assert_less_than(4, 5)
|
101
102
|
#
|
102
103
|
# ====Parameters:
|
103
104
|
# [lhs]
|
@@ -119,7 +120,7 @@ module Assertions
|
|
119
120
|
# lhs <= rhs.
|
120
121
|
#
|
121
122
|
# ====Example:
|
122
|
-
#
|
123
|
+
# assert_less_than_or_equal_to(4, 4)
|
123
124
|
#
|
124
125
|
# ====Parameters:
|
125
126
|
# [lhs]
|
@@ -142,9 +143,9 @@ module Assertions
|
|
142
143
|
# message expected_exception_message.
|
143
144
|
#
|
144
145
|
# ====Example:
|
145
|
-
#
|
146
|
-
#
|
147
|
-
#
|
146
|
+
# assert_raise_message("Hello, exception!", RuntimeError) do
|
147
|
+
# raise "Hello, exception!"
|
148
|
+
# end
|
148
149
|
#
|
149
150
|
# ====Parameters:
|
150
151
|
# [expected_exception_message]
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: assertions
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 1.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- DesigningPatterns
|
@@ -21,7 +21,7 @@ dependencies:
|
|
21
21
|
- !ruby/object:Gem::Version
|
22
22
|
version: 1.5.3
|
23
23
|
version:
|
24
|
-
description: "This package adds some additional assertions to Test::Unit::Assertions, including: * Assertions for all of the comparison operators (assert_greater_than, assert_less_than_or_equal_to, etc.). Shorter aliases also are provided for these (assert_gt, assert_le, etc.). * An assertion that
|
24
|
+
description: "This package adds some additional assertions to Test::Unit::Assertions, including: * Assertions for all of the comparison operators (assert_greater_than, assert_less_than_or_equal_to, etc.). Shorter aliases also are provided for these (assert_gt, assert_le, etc.). * An assertion that verifies that a given block raises a specified exception with a specified message (assert_raise_message). This allows full testing of error messages. * An assertion that verifies that a given block contains an assertion that fails, which can be used to test new assertions."
|
25
25
|
email:
|
26
26
|
- technical.inquiries@designingpatterns.com
|
27
27
|
executables: []
|