test/unit/context/setup_dsl_tests.rb in assert-2.17.0 vs test/unit/context/setup_dsl_tests.rb in assert-2.18.0
- old
+ new
@@ -1,14 +1,12 @@
require "assert"
require "assert/context/setup_dsl"
module Assert::Context::SetupDSL
-
class UnitTests < Assert::Context
desc "Assert::Context::SetupDSL"
subject{ @context_class }
-
end
class SetupTeardownOnceMethodsTests < UnitTests
desc "once methods"
setup do
@@ -21,11 +19,10 @@
should "add the block to the suite" do
assert_includes @block, subject.suite.send(:setups)
assert_includes @block, subject.suite.send(:teardowns)
end
-
end
class SetupTeardownMethodsTests < UnitTests
desc "methods"
setup do
@@ -38,11 +35,10 @@
should "add the block to the context" do
assert_includes @block, subject.send(:setups)
assert_includes @block, subject.send(:teardowns)
end
-
end
class SetupTeardownWithMethodNameTests < UnitTests
desc "methods given a method name"
setup do
@@ -55,11 +51,10 @@
should "add the method name to the context" do
assert_includes @method_name, subject.send(:setups)
assert_includes @method_name, subject.send(:teardowns)
end
-
end
class SetupTeardownMultipleTests < UnitTests
desc "with multiple calls"
setup do
@@ -95,11 +90,10 @@
assert_equal "the setup has been run with something", obj.setup_status
subject.send("run_teardowns", obj = @test_status_class.new)
assert_equal "with something has been run the teardown", obj.teardown_status
end
-
end
class AroundMethodTests < UnitTests
desc "with multiple `around` calls"
setup do
@@ -139,9 +133,7 @@
exp = "p-around start, c-around1 start, c-around2 start, "\
"TEST, "\
"c-around2 end, c-around1 end, p-around end."
assert_equal exp, obj.out_status
end
-
end
-
end