Sha256: 53f3d3e28960e26c8f9e171abf711b54afcbcf1250924dfa4e505620f8bfecf1
Contents?: true
Size: 1 KB
Versions: 15
Compression:
Stored size: 1 KB
Contents
require 'assert' class Assert::Assertions::AssertNotBlockTest < Assert::Context desc "the assert_not_block helper run in a test" setup do fail_desc = @fail_desc = "assert not block fail desc" @test = Factory.test do assert_not_block(fail_desc){ true } assert_not_block{ false } end @test.run end subject{ @test } should "have 2 total results" do assert_equal 2, subject.result_count end should "have 1 pass result" do assert_equal 1, subject.result_count(:pass) end should "have 1 fail result" do assert_equal 1, subject.result_count(:fail) end class FailMessageTest < AssertNotBlockTest desc "with a failed result" setup do @expected = [@fail_desc, "Expected block to return false value."].join("\n") @fail_message = @test.fail_results.first.message end subject{ @fail_message } should "have a fail message with an explanation of what failed and my fail description" do assert_equal @expected, subject end end end
Version data entries
15 entries across 15 versions & 1 rubygems