test/unit/context_tests.rb in assert-2.3.1 vs test/unit/context_tests.rb in assert-2.3.2
- old
+ new
@@ -106,16 +106,10 @@
fail_msg = "Didn't work"
result = @context.fail(fail_msg)
assert_equal fail_msg, result.message
end
- should "set any given result message evaluated from a proc" do
- fail_msg = ::Proc.new{ "Still didn't work" }
- result = @context.fail(fail_msg)
- assert_equal fail_msg.call, result.message
- end
-
end
class HaltOnFailTests < FailTests
desc "when halting on fails"
setup do
@@ -149,16 +143,16 @@
@fail_desc = "my fail desc"
@what_failed = "what failed"
end
should "return a pass result given a `true` assertion" do
- result = subject.assert(true, @fail_desc, @what_failed)
+ result = subject.assert(true, @fail_desc){ @what_failed }
assert_kind_of Assert::Result::Pass, result
assert_nil result.message
end
should "return a fail result given a `false` assertion" do
- result = subject.assert(false, @fail_desc, @what_failed)
+ result = subject.assert(false, @fail_desc){ @what_failed }
assert_kind_of Assert::Result::Fail, result
assert_equal [@fail_desc, @what_failed].join("\n"), result.message
end
should "return a pass result given a \"truthy\" assertion" do