Upgrade to Rails 2.2.0
As a side benefit, fix an (non-user-visible) bug in display_s5(). Also fixed a bug where removing orphaned pages did not expire cached summary pages.
This commit is contained in:
parent
39348c65c2
commit
7600aef48b
827 changed files with 123652 additions and 11027 deletions
24
vendor/rails/activesupport/test/test_test.rb
vendored
24
vendor/rails/activesupport/test/test_test.rb
vendored
|
@ -60,6 +60,24 @@ class AssertDifferenceTest < Test::Unit::TestCase
|
|||
@object.increment
|
||||
end
|
||||
end
|
||||
|
||||
def test_array_of_expressions_identify_failure
|
||||
assert_difference ['@object.num', '1 + 1'] do
|
||||
@object.increment
|
||||
end
|
||||
fail 'should not get to here'
|
||||
rescue Test::Unit::AssertionFailedError => e
|
||||
assert_equal "<1 + 1> was the expression that failed.\n<3> expected but was\n<2>.", e.message
|
||||
end
|
||||
|
||||
def test_array_of_expressions_identify_failure_when_message_provided
|
||||
assert_difference ['@object.num', '1 + 1'], 1, 'something went wrong' do
|
||||
@object.increment
|
||||
end
|
||||
fail 'should not get to here'
|
||||
rescue Test::Unit::AssertionFailedError => e
|
||||
assert_equal "something went wrong.\n<1 + 1> was the expression that failed.\n<3> expected but was\n<2>.", e.message
|
||||
end
|
||||
else
|
||||
def default_test; end
|
||||
end
|
||||
|
@ -84,6 +102,12 @@ class SetupAndTeardownTest < Test::Unit::TestCase
|
|||
assert_equal [:foo, :sentinel, :foo], self.class.teardown_callback_chain.map(&:method)
|
||||
end
|
||||
|
||||
def setup
|
||||
end
|
||||
|
||||
def teardown
|
||||
end
|
||||
|
||||
protected
|
||||
def reset_callback_record
|
||||
@called_back = []
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue