assert 2.0.0.rc.1 → 2.0.0
Sign up to get free protection for your applications and to get access to all the features.
- data/Gemfile +1 -1
- data/{LICENSE → LICENSE.txt} +0 -0
- data/Rakefile +1 -3
- data/assert.gemspec +15 -15
- data/lib/assert.rb +1 -2
- data/lib/assert/assert_runner.rb +2 -1
- data/lib/assert/assertions.rb +153 -189
- data/lib/assert/version.rb +1 -1
- data/test/helper.rb +74 -51
- data/test/{fixtures → support}/inherited_stuff.rb +0 -0
- data/test/{test → system}/running_tests.rb +16 -43
- data/test/{assert_test.rb → unit/assert_tests.rb} +0 -0
- data/test/unit/assertions/assert_block_tests.rb +57 -0
- data/test/unit/assertions/assert_empty_tests.rb +58 -0
- data/test/unit/assertions/assert_equal_tests.rb +59 -0
- data/test/unit/assertions/assert_file_exists_tests.rb +59 -0
- data/test/unit/assertions/assert_includes_tests.rb +61 -0
- data/test/unit/assertions/assert_instance_of_tests.rb +61 -0
- data/test/unit/assertions/assert_kind_of_tests.rb +60 -0
- data/test/unit/assertions/assert_match_tests.rb +59 -0
- data/test/unit/assertions/assert_nil_tests.rb +59 -0
- data/test/unit/assertions/assert_raises_tests.rb +73 -0
- data/test/unit/assertions/assert_respond_to_tests.rb +63 -0
- data/test/unit/assertions/assert_same_tests.rb +65 -0
- data/test/unit/assertions_tests.rb +65 -0
- data/test/unit/context/basic_singleton_tests.rb +86 -0
- data/test/unit/context/setup_teardown_singleton_tests.rb +105 -0
- data/test/unit/context/test_should_singleton_tests.rb +134 -0
- data/test/{context_test.rb → unit/context_tests.rb} +53 -131
- data/test/{macro_test.rb → unit/macro_tests.rb} +15 -11
- data/test/{result_test.rb → unit/result_tests.rb} +27 -26
- data/test/{runner_test.rb → unit/runner_tests.rb} +1 -2
- data/test/{suite_test.rb → unit/suite_tests.rb} +63 -95
- data/test/{test_test.rb → unit/test_tests.rb} +45 -77
- data/test/{view/base_tests.rb → unit/view_tests.rb} +0 -1
- metadata +63 -104
- data/CHANGELOG.md +0 -33
- data/test/assertions/assert_block_test.rb +0 -39
- data/test/assertions/assert_empty_test.rb +0 -43
- data/test/assertions/assert_equal_test.rb +0 -43
- data/test/assertions/assert_file_exists_test.rb +0 -43
- data/test/assertions/assert_includes_test.rb +0 -44
- data/test/assertions/assert_instance_of_test.rb +0 -43
- data/test/assertions/assert_kind_of_test.rb +0 -43
- data/test/assertions/assert_match_test.rb +0 -43
- data/test/assertions/assert_nil_test.rb +0 -43
- data/test/assertions/assert_not_block_test.rb +0 -39
- data/test/assertions/assert_not_empty_test.rb +0 -43
- data/test/assertions/assert_not_equal_test.rb +0 -43
- data/test/assertions/assert_not_file_exists_test.rb +0 -43
- data/test/assertions/assert_not_included_test.rb +0 -44
- data/test/assertions/assert_not_instance_of_test.rb +0 -43
- data/test/assertions/assert_not_kind_of_test.rb +0 -43
- data/test/assertions/assert_not_match_test.rb +0 -43
- data/test/assertions/assert_not_nil_test.rb +0 -43
- data/test/assertions/assert_not_respond_to_test.rb +0 -43
- data/test/assertions/assert_not_same_test.rb +0 -45
- data/test/assertions/assert_nothing_raised_test.rb +0 -46
- data/test/assertions/assert_raises_test.rb +0 -49
- data/test/assertions/assert_respond_to_test.rb +0 -43
- data/test/assertions/assert_same_test.rb +0 -45
- data/test/assertions_test.rb +0 -60
- data/test/context/class_methods_test.rb +0 -531
- data/test/fixtures/sample_context.rb +0 -13
- data/test/fixtures/test_root/one_test.rb +0 -0
- data/test/fixtures/test_root/parent/area_one/area_test.rb +0 -0
- data/test/fixtures/test_root/shallow/deeply/nested_test.rb +0 -0
- data/test/fixtures/test_root/shallow/nested_test.rb +0 -0
- data/test/fixtures/test_root/shallow_test.rb +0 -0
- data/test/fixtures/test_root/two_test.rb +0 -0
- data/test/suite/context_info_test.rb +0 -42
data/Gemfile
CHANGED
data/{LICENSE → LICENSE.txt}
RENAMED
File without changes
|
data/Rakefile
CHANGED
data/assert.gemspec
CHANGED
@@ -1,22 +1,22 @@
|
|
1
1
|
# -*- encoding: utf-8 -*-
|
2
|
-
|
2
|
+
lib = File.expand_path('../lib', __FILE__)
|
3
|
+
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
3
4
|
require "assert/version"
|
4
5
|
|
5
|
-
Gem::Specification.new do |
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
s.description = %q{Test::Unit style testing framework, just better than Test::Unit.}
|
6
|
+
Gem::Specification.new do |gem|
|
7
|
+
gem.name = "assert"
|
8
|
+
gem.version = Assert::VERSION
|
9
|
+
gem.authors = ["Kelly Redding", "Collin Redding"]
|
10
|
+
gem.email = ["kelly@kellyredding.com", "collin.redding@me.com"]
|
11
|
+
gem.description = %q{Test::Unit style testing framework, just better than Test::Unit.}
|
12
|
+
gem.summary = %q{Test::Unit style testing framework, just better than Test::Unit.}
|
13
|
+
gem.homepage = "http://github.com/redding/assert"
|
14
14
|
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
15
|
+
gem.files = `git ls-files`.split($/)
|
16
|
+
gem.executables = gem.files.grep(%r{^bin/}).map{ |f| File.basename(f) }
|
17
|
+
gem.test_files = gem.files.grep(%r{^(test|spec|features)/})
|
18
|
+
gem.require_paths = ["lib"]
|
19
19
|
|
20
|
-
|
20
|
+
gem.add_dependency("ansi", ["~> 1.3"])
|
21
21
|
|
22
22
|
end
|
data/lib/assert.rb
CHANGED
data/lib/assert/assert_runner.rb
CHANGED
@@ -47,7 +47,8 @@ module Assert
|
|
47
47
|
|
48
48
|
def test_files(test_paths)
|
49
49
|
test_paths.inject(Set.new) do |paths, path|
|
50
|
-
|
50
|
+
p = File.expand_path(path, Dir.pwd)
|
51
|
+
paths += Dir.glob("#{p}*") + Dir.glob("#{p}*/**/*")
|
51
52
|
end.select{ |p| is_test_file?(p) }.sort
|
52
53
|
end
|
53
54
|
|
data/lib/assert/assertions.rb
CHANGED
@@ -1,267 +1,231 @@
|
|
1
1
|
module Assert
|
2
2
|
module Assertions
|
3
3
|
|
4
|
-
def assert_block(
|
5
|
-
|
6
|
-
assert(yield,
|
4
|
+
def assert_block(desc=nil)
|
5
|
+
msg ||= "Expected block to return a true value."
|
6
|
+
assert(yield, desc, msg)
|
7
7
|
end
|
8
8
|
|
9
|
-
def assert_not_block(
|
10
|
-
|
11
|
-
assert(!yield,
|
9
|
+
def assert_not_block(desc=nil)
|
10
|
+
msg ||= "Expected block to return a false value."
|
11
|
+
assert(!yield, desc, msg)
|
12
12
|
end
|
13
13
|
alias_method :refute_block, :assert_not_block
|
14
14
|
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
assertion, what_failed_msg = check_exception(args, :raises, &block)
|
19
|
-
assert(assertion, nil, what_failed_msg)
|
15
|
+
def assert_empty(collection, desc=nil)
|
16
|
+
msg = "Expected #{collection.inspect} to be empty."
|
17
|
+
assert(collection.empty?, desc, msg)
|
20
18
|
end
|
21
|
-
alias_method :assert_raise, :assert_raises
|
22
19
|
|
23
|
-
def
|
24
|
-
|
25
|
-
assert(!
|
20
|
+
def assert_not_empty(collection, desc=nil)
|
21
|
+
msg = "Expected #{collection.inspect} to not be empty."
|
22
|
+
assert(!collection.empty?, desc, msg)
|
26
23
|
end
|
27
|
-
alias_method :
|
28
|
-
alias_method :assert_not_raise, :assert_nothing_raised
|
29
|
-
|
30
|
-
|
24
|
+
alias_method :refute_empty, :assert_not_empty
|
31
25
|
|
32
|
-
def
|
33
|
-
|
34
|
-
|
35
|
-
"of #{klass}, not #{instance.class}."
|
36
|
-
].join
|
37
|
-
assert(instance.kind_of?(klass), fail_desc, what_failed_msg)
|
26
|
+
def assert_equal(expected, actual, desc=nil)
|
27
|
+
msg = "Expected #{expected.inspect}, not #{actual.inspect}."
|
28
|
+
assert(actual == expected, desc, msg)
|
38
29
|
end
|
39
30
|
|
40
|
-
def
|
41
|
-
|
42
|
-
|
43
|
-
"kind of #{klass}."
|
44
|
-
].join
|
45
|
-
assert(!instance.kind_of?(klass), fail_desc, what_failed_msg)
|
31
|
+
def assert_not_equal(expected, actual, desc=nil)
|
32
|
+
msg = "#{actual.inspect} not expected to equal #{expected.inspect}."
|
33
|
+
assert(actual != expected, desc, msg)
|
46
34
|
end
|
47
|
-
alias_method :
|
48
|
-
|
49
|
-
|
35
|
+
alias_method :refute_equal, :assert_not_equal
|
50
36
|
|
51
|
-
def
|
52
|
-
|
53
|
-
|
54
|
-
"of #{klass}, not #{instance.class}."
|
55
|
-
].join
|
56
|
-
assert(instance.instance_of?(klass), fail_desc, what_failed_msg)
|
37
|
+
def assert_file_exists(file_path, desc=nil)
|
38
|
+
msg = "Expected #{file_path.inspect} to exist."
|
39
|
+
assert(File.exists?(File.expand_path(file_path)), desc, msg)
|
57
40
|
end
|
58
41
|
|
59
|
-
def
|
60
|
-
|
61
|
-
|
62
|
-
"instance of #{klass}."
|
63
|
-
].join
|
64
|
-
assert(!instance.instance_of?(klass), fail_desc, what_failed_msg)
|
42
|
+
def assert_not_file_exists(file_path, desc=nil)
|
43
|
+
msg = "Expected #{file_path.inspect} to not exist."
|
44
|
+
assert(!File.exists?(File.expand_path(file_path)), desc, msg)
|
65
45
|
end
|
66
|
-
alias_method :
|
67
|
-
|
68
|
-
|
46
|
+
alias_method :refute_file_exists, :assert_not_file_exists
|
69
47
|
|
70
|
-
def
|
71
|
-
|
72
|
-
|
73
|
-
"respond to ##{method}."
|
74
|
-
].join
|
75
|
-
assert(object.respond_to?(method), fail_desc, what_failed_msg)
|
48
|
+
def assert_includes(object, collection, desc=nil)
|
49
|
+
msg = "Expected #{collection.inspect} to include #{object.inspect}."
|
50
|
+
assert(collection.include?(object), desc, msg)
|
76
51
|
end
|
77
|
-
alias_method :
|
52
|
+
alias_method :assert_included, :assert_includes
|
78
53
|
|
79
|
-
def
|
80
|
-
|
81
|
-
|
82
|
-
"respond to ##{method}."
|
83
|
-
].join
|
84
|
-
assert(!object.respond_to?(method), fail_desc, what_failed_msg)
|
54
|
+
def assert_not_includes(object, collection, desc=nil)
|
55
|
+
msg = "Expected #{collection.inspect} to not include #{object.inspect}."
|
56
|
+
assert(!collection.include?(object), desc, msg)
|
85
57
|
end
|
86
|
-
alias_method :
|
87
|
-
alias_method :
|
88
|
-
alias_method :
|
89
|
-
|
90
|
-
|
58
|
+
alias_method :assert_not_included, :assert_not_includes
|
59
|
+
alias_method :refute_includes, :assert_not_includes
|
60
|
+
alias_method :refute_included, :assert_not_includes
|
91
61
|
|
92
|
-
def
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
].join
|
97
|
-
assert(actual.equal?(expected), fail_desc, what_failed_msg)
|
62
|
+
def assert_instance_of(klass, instance, desc=nil)
|
63
|
+
msg = "Expected #{instance.inspect} (#{instance.class}) to"\
|
64
|
+
" be an instance of #{klass}."
|
65
|
+
assert(instance.instance_of?(klass), desc, msg)
|
98
66
|
end
|
99
67
|
|
100
|
-
def
|
101
|
-
|
102
|
-
|
103
|
-
"as #{actual} (#{actual.object_id})."
|
104
|
-
].join
|
105
|
-
assert(!actual.equal?(expected), fail_desc, what_failed_msg)
|
68
|
+
def assert_not_instance_of(klass, instance, desc=nil)
|
69
|
+
msg = "#{instance.inspect} not expected to be an instance of #{klass}."
|
70
|
+
assert(!instance.instance_of?(klass), desc, msg)
|
106
71
|
end
|
107
|
-
alias_method :
|
108
|
-
|
109
|
-
|
72
|
+
alias_method :refute_instance_of, :assert_not_instance_of
|
110
73
|
|
111
|
-
def
|
112
|
-
|
113
|
-
|
74
|
+
def assert_kind_of(klass, instance, desc=nil)
|
75
|
+
msg = "Expected #{instance.inspect} (#{instance.class}) to"\
|
76
|
+
" be a kind of #{klass}."
|
77
|
+
assert(instance.kind_of?(klass), desc, msg)
|
114
78
|
end
|
115
79
|
|
116
|
-
def
|
117
|
-
|
118
|
-
|
119
|
-
].join
|
120
|
-
assert(actual != expected, fail_desc, what_failed_msg)
|
80
|
+
def assert_not_kind_of(klass, instance, desc=nil)
|
81
|
+
msg = "#{instance.inspect} not expected to be a kind of #{klass}."
|
82
|
+
assert(!instance.kind_of?(klass), desc, msg)
|
121
83
|
end
|
122
|
-
alias_method :
|
123
|
-
|
124
|
-
|
84
|
+
alias_method :refute_kind_of, :assert_not_kind_of
|
125
85
|
|
126
|
-
def assert_match(expected, actual,
|
127
|
-
|
86
|
+
def assert_match(expected, actual, desc=nil)
|
87
|
+
msg = "Expected #{actual.inspect} to match #{expected.inspect}."
|
128
88
|
expected = /#{Regexp.escape(expected)}/ if String === expected && String === actual
|
129
|
-
assert(actual =~ expected,
|
89
|
+
assert(actual =~ expected, desc, msg)
|
130
90
|
end
|
131
91
|
|
132
|
-
def assert_not_match(expected, actual,
|
133
|
-
|
134
|
-
"#{actual.inspect} not expected to ", "match #{expected.inspect}."
|
135
|
-
].join
|
92
|
+
def assert_not_match(expected, actual, desc=nil)
|
93
|
+
msg = "#{actual.inspect} not expected to match #{expected.inspect}."
|
136
94
|
expected = /#{Regexp.escape(expected)}/ if String === expected && String === actual
|
137
|
-
assert(actual !~ expected,
|
95
|
+
assert(actual !~ expected, desc, msg)
|
138
96
|
end
|
139
97
|
alias_method :refute_match, :assert_not_match
|
140
98
|
alias_method :assert_no_match, :assert_not_match
|
141
99
|
|
142
|
-
|
143
|
-
|
144
|
-
|
145
|
-
what_failed_msg = "Expected #{collection.inspect} to be empty."
|
146
|
-
assert(collection.empty?, fail_desc, what_failed_msg)
|
100
|
+
def assert_nil(object, desc=nil)
|
101
|
+
msg = "Expected nil, not #{object.inspect}."
|
102
|
+
assert(object.nil?, desc, msg)
|
147
103
|
end
|
148
104
|
|
149
|
-
def
|
150
|
-
|
151
|
-
assert(!
|
105
|
+
def assert_not_nil(object, desc=nil)
|
106
|
+
msg = "Expected #{object.inspect} to not be nil."
|
107
|
+
assert(!object.nil?, desc, msg)
|
152
108
|
end
|
153
|
-
alias_method :
|
154
|
-
|
155
|
-
|
109
|
+
alias_method :refute_nil, :assert_not_nil
|
156
110
|
|
157
|
-
def
|
158
|
-
|
159
|
-
|
111
|
+
def assert_raises(*exceptions, &block)
|
112
|
+
desc = exceptions.last.kind_of?(String) ? exceptions.pop : nil
|
113
|
+
err = RaisedException.new(exceptions, &block)
|
114
|
+
assert(err.raised?, desc, err.msg)
|
160
115
|
end
|
161
|
-
alias_method :
|
116
|
+
alias_method :assert_raise, :assert_raises
|
162
117
|
|
163
|
-
def
|
164
|
-
|
165
|
-
|
118
|
+
def assert_nothing_raised(*exceptions, &block)
|
119
|
+
desc = exceptions.last.kind_of?(String) ? exceptions.pop : nil
|
120
|
+
err = NoRaisedException.new(exceptions, &block)
|
121
|
+
assert(!err.raised?, desc, err.msg)
|
166
122
|
end
|
167
|
-
alias_method :
|
168
|
-
alias_method :
|
169
|
-
alias_method :refute_included, :assert_not_includes
|
170
|
-
|
171
|
-
|
123
|
+
alias_method :assert_not_raises, :assert_nothing_raised
|
124
|
+
alias_method :assert_not_raise, :assert_nothing_raised
|
172
125
|
|
173
|
-
def
|
174
|
-
|
175
|
-
|
126
|
+
def assert_respond_to(method, object, desc=nil)
|
127
|
+
msg = "Expected #{object.inspect} (#{object.class}) to"\
|
128
|
+
" respond to `#{method}`."
|
129
|
+
assert(object.respond_to?(method), desc, msg)
|
176
130
|
end
|
131
|
+
alias_method :assert_responds_to, :assert_respond_to
|
177
132
|
|
178
|
-
def
|
179
|
-
|
180
|
-
|
133
|
+
def assert_not_respond_to(method, object, desc=nil)
|
134
|
+
msg = "#{object.inspect} (#{object.class}) not expected to"\
|
135
|
+
" respond to `#{method}`."
|
136
|
+
assert(!object.respond_to?(method), desc, msg)
|
181
137
|
end
|
182
|
-
alias_method :
|
183
|
-
|
184
|
-
|
138
|
+
alias_method :assert_not_responds_to, :assert_not_respond_to
|
139
|
+
alias_method :refute_respond_to, :assert_not_respond_to
|
140
|
+
alias_method :refute_responds_to, :assert_not_respond_to
|
185
141
|
|
186
|
-
def
|
187
|
-
|
188
|
-
|
142
|
+
def assert_same(expected, actual, desc=nil)
|
143
|
+
msg = "Expected #{actual} (#{actual.object_id}) to"\
|
144
|
+
" be the same as #{expected} (#{expected.object_id})."
|
145
|
+
assert(actual.equal?(expected), desc, msg)
|
189
146
|
end
|
190
147
|
|
191
|
-
def
|
192
|
-
|
193
|
-
|
148
|
+
def assert_not_same(expected, actual, desc=nil)
|
149
|
+
msg = "#{actual} (#{actual.object_id}) not expected to"\
|
150
|
+
" be the same as #{expected} (#{expected.object_id})."
|
151
|
+
assert(!actual.equal?(expected), desc, msg)
|
194
152
|
end
|
195
|
-
alias_method :
|
196
|
-
|
153
|
+
alias_method :refute_same, :assert_not_same
|
197
154
|
|
155
|
+
# ignored assertion helpers
|
198
156
|
|
199
|
-
IGNORED_ASSERTION_HELPERS = [
|
200
|
-
:
|
201
|
-
:
|
157
|
+
IGNORED_ASSERTION_HELPERS = [
|
158
|
+
:assert_throws, :assert_nothing_thrown,
|
159
|
+
:assert_operator, :refute_operator,
|
160
|
+
:assert_in_epsilon, :refute_in_epsilon,
|
161
|
+
:assert_in_delta, :refute_in_delta,
|
162
|
+
:assert_send
|
202
163
|
]
|
203
164
|
def method_missing(method, *args, &block)
|
204
165
|
if IGNORED_ASSERTION_HELPERS.include?(method.to_sym)
|
205
|
-
ignore
|
206
|
-
|
207
|
-
"another helper or the basic assert."
|
208
|
-
].join)
|
166
|
+
ignore "The assertion `#{method}` is not supported."\
|
167
|
+
" Please use another assertion or the basic `assert`."
|
209
168
|
else
|
210
169
|
super
|
211
170
|
end
|
212
171
|
end
|
213
172
|
|
214
|
-
|
173
|
+
# exception raised utility classes
|
174
|
+
|
175
|
+
class CheckException
|
176
|
+
attr_reader :msg, :exception
|
215
177
|
|
216
|
-
|
217
|
-
|
218
|
-
|
219
|
-
|
220
|
-
yield
|
221
|
-
rescue Exception => exception
|
178
|
+
def initialize(exceptions, &block)
|
179
|
+
@exceptions = exceptions
|
180
|
+
begin; block.call; rescue Exception => @exception; end
|
181
|
+
@msg = "#{exceptions_sentence(@exceptions)} #{exception_details}"
|
222
182
|
end
|
223
|
-
|
224
|
-
|
225
|
-
|
183
|
+
|
184
|
+
def raised?
|
185
|
+
!@exception.nil? && is_one_of?(@exception, @exceptions)
|
186
|
+
end
|
187
|
+
|
188
|
+
private
|
189
|
+
|
190
|
+
def is_one_of?(exception, exceptions)
|
191
|
+
exceptions.empty? || exceptions.any? do |exp|
|
192
|
+
exp.instance_of?(Module) ? exception.kind_of?(exp) : exception.class == exp
|
226
193
|
end
|
227
|
-
[ test, exception_details(exception, which) ]
|
228
|
-
else
|
229
|
-
[ false, exception_details(exception, which) ]
|
230
194
|
end
|
231
|
-
what_failed_msg = "#{exceptions_sentence(exceptions)} #{what_failed_msg}"
|
232
|
-
fail_desc = [ fail_desc, what_failed_msg ].compact.join("\n")
|
233
|
-
[ assertion, fail_desc ]
|
234
|
-
end
|
235
195
|
|
236
|
-
|
237
|
-
|
238
|
-
|
239
|
-
|
240
|
-
|
241
|
-
when :not_raises
|
242
|
-
"exception was not expected, but was raised:"
|
196
|
+
def exceptions_sentence(exceptions)
|
197
|
+
if exceptions.size <= 1
|
198
|
+
(exceptions.first || "An").to_s
|
199
|
+
else
|
200
|
+
"#{exceptions[0..-2].join(", ")} or #{exceptions[-1]}"
|
243
201
|
end
|
244
|
-
|
245
|
-
|
246
|
-
|
247
|
-
|
248
|
-
|
249
|
-
|
250
|
-
|
251
|
-
|
252
|
-
|
253
|
-
|
254
|
-
|
255
|
-
|
202
|
+
end
|
203
|
+
|
204
|
+
def exception_details(raised_msg=nil, no_raised_msg=nil)
|
205
|
+
if @exception
|
206
|
+
backtrace = Assert::Result::Backtrace.new(@exception.backtrace)
|
207
|
+
[ raised_msg,
|
208
|
+
"Class: <#{@exception.class}>",
|
209
|
+
"Message: <#{@exception.message.inspect}>",
|
210
|
+
"---Backtrace---",
|
211
|
+
backtrace.filtered.to_s,
|
212
|
+
"---------------"
|
213
|
+
].compact.join("\n")
|
214
|
+
else
|
215
|
+
no_raised_msg
|
256
216
|
end
|
257
217
|
end
|
258
218
|
end
|
259
219
|
|
260
|
-
|
261
|
-
|
262
|
-
(
|
263
|
-
|
264
|
-
|
220
|
+
class RaisedException < CheckException
|
221
|
+
def exception_details
|
222
|
+
super("exception expected, not:", "exception expected but nothing raised.")
|
223
|
+
end
|
224
|
+
end
|
225
|
+
|
226
|
+
class NoRaisedException < CheckException
|
227
|
+
def exception_details
|
228
|
+
super("exception not expected, but raised:")
|
265
229
|
end
|
266
230
|
end
|
267
231
|
|