test/unit/assertions/assert_block_tests.rb in assert-2.19.2 vs test/unit/assertions/assert_block_tests.rb in assert-2.19.3
- old
+ new
@@ -6,19 +6,19 @@
module Assert::Assertions
class AssertBlockTests < Assert::Context
include Assert::Test::TestHelpers
desc "`assert_block`"
- subject {
+ subject do
desc = desc1
Factory.test do
- assert_block { true } # pass
- assert_block(desc) { false } # fail
+ assert_block{ true } # pass
+ assert_block(desc){ false } # fail
end
- }
+ end
- let(:desc1) { "assert block fail desc" }
+ let(:desc1){ "assert block fail desc" }
should "produce results as expected" do
subject.run(&test_run_callback)
assert_that(test_run_result_count).equals(2)
@@ -32,18 +32,18 @@
class AssertNotBlockTests < Assert::Context
include Assert::Test::TestHelpers
desc "`assert_not_block`"
- subject {
+ subject do
desc = desc1
Factory.test do
- assert_not_block(desc) { true } # fail
- assert_not_block { false } # pass
+ assert_not_block(desc){ true } # fail
+ assert_not_block{ false } # pass
end
- }
+ end
- let(:desc1) { "assert not block fail desc" }
+ let(:desc1){ "assert not block fail desc" }
should "produce results as expected" do
subject.run(&test_run_callback)
assert_that(test_run_result_count).equals(2)