Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

renamed and cleaned up styling of new tests

[git-p4: depot-paths = "//src/minitest/dev/": change = 7648]
  • Loading branch information...
commit 7eeffc80164a5c88f8b0039af31ab532288fc5dc 1 parent c8283ff
@zenspider zenspider authored
Showing with 10 additions and 16 deletions.
  1. +10 −16 test/minitest/test_minitest_unit.rb
View
26 test/minitest/test_minitest_unit.rb
@@ -490,31 +490,25 @@ def test_omg; assert true; end
assert_equal expected, call_order
end
- def test_teardown_with_successful_assertion
- test_class = Class.new(MiniTest::Unit::TestCase) do
- define_method :teardown do
- assert true
- end
-
+ def test_passed_eh_teardown_good
+ test_class = Class.new MiniTest::Unit::TestCase do
+ def teardown; assert true; end
def test_omg; assert true; end
end
- test = test_class.new(:test_omg)
- test.run(@tu)
+ test = test_class.new :test_omg
+ test.run @tu
assert test.passed?
end
- def test_teardown_with_failing_assertion
- test_class = Class.new(MiniTest::Unit::TestCase) do
- define_method :teardown do
- flunk
- end
-
+ def test_passed_eh_teardown_flunked
+ test_class = Class.new MiniTest::Unit::TestCase do
+ def teardown; flunk; end
def test_omg; assert true; end
end
- test = test_class.new(:test_omg)
- test.run(@tu)
+ test = test_class.new :test_omg
+ test.run @tu
refute test.passed?
end
Please sign in to comment.
Something went wrong with that request. Please try again.