Skip to content

Commit

Permalink
unit.rb: no insult method
Browse files Browse the repository at this point in the history
* test/lib/minitest/unit.rb (i_suck_and_my_tests_are_order_dependent!):
  remove.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49133 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
  • Loading branch information
nobu committed Jan 4, 2015
1 parent 8a57298 commit 49243b9
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 34 deletions.
12 changes: 0 additions & 12 deletions test/lib/minitest/unit.rb
Original file line number Diff line number Diff line change
Expand Up @@ -1328,18 +1328,6 @@ def self.reset # :nodoc:

reset

##
# Call this at the top of your tests when you absolutely
# positively need to have ordered tests. In doing so, you're
# admitting that you suck and your tests are weak.

def self.i_suck_and_my_tests_are_order_dependent!
class << self
undef_method :test_order if method_defined? :test_order
define_method :test_order do :alpha end
end
end

##
# Make diffs for this TestCase use #pretty_inspect so that diff
# in assert_equal can be more details. NOTE: this is much slower
Expand Down
22 changes: 0 additions & 22 deletions test/minitest/test_minitest_unit.rb
Original file line number Diff line number Diff line change
Expand Up @@ -1648,28 +1648,6 @@ def test_test1; assert "does not matter" end
assert_equal expected, sample_test_case.test_methods
end

def test_i_suck_and_my_tests_are_order_dependent_bang_sets_test_order_alpha
@assertion_count = 0

shitty_test_case = Class.new MiniTest::Unit::TestCase

shitty_test_case.i_suck_and_my_tests_are_order_dependent!

assert_equal :alpha, shitty_test_case.test_order
end

def test_i_suck_and_my_tests_are_order_dependent_bang_does_not_warn
@assertion_count = 0

shitty_test_case = Class.new MiniTest::Unit::TestCase

def shitty_test_case.test_order ; :lol end

assert_silent do
shitty_test_case.i_suck_and_my_tests_are_order_dependent!
end
end

def util_assert_triggered expected, klass = MiniTest::Assertion
e = assert_raises klass do
yield
Expand Down

0 comments on commit 49243b9

Please sign in to comment.