test/unit/assertions/assert_match_tests.rb in assert-2.19.2 vs test/unit/assertions/assert_match_tests.rb in assert-2.19.3
- old
+ new
@@ -8,21 +8,21 @@
module Assert::Assertions
class AssertMatchTests < Assert::Context
include Assert::Test::TestHelpers
desc "`assert_match`"
- subject {
+ subject do
args = args1
Factory.test do
assert_match(/a/, "a string") # pass
assert_match(*args) # fail
end
- }
+ end
- let(:desc1) { "assert match fail desc" }
- let(:args1) { ["not", "a string", desc1] }
- let(:config1) { subject.config }
+ let(:desc1){ "assert match fail desc" }
+ let(:args1){ ["not", "a string", desc1] }
+ let(:config1){ subject.config }
should "produce results as expected" do
subject.run(&test_run_callback)
assert_that(test_run_result_count).equals(2)
@@ -38,20 +38,20 @@
class AssertNotMatchTests < Assert::Context
include Assert::Test::TestHelpers
desc "`assert_not_match`"
- subject {
+ subject do
args = args1
Factory.test do
assert_not_match(*args) # fail
assert_not_match("not", "a string") # pass
end
- }
+ end
- let(:desc1) { "assert not match fail desc" }
- let(:args1) { [/a/, "a string", desc1] }
- let(:config1) { subject.config }
+ let(:desc1){ "assert not match fail desc" }
+ let(:args1){ [/a/, "a string", desc1] }
+ let(:config1){ subject.config }
should "produce results as expected" do
subject.run(&test_run_callback)
assert_that(test_run_result_count).equals(2)