From 891a962a192bdd7eb0402b41e11a5e5657fe961c Mon Sep 17 00:00:00 2001 From: Rick Olson Date: Sun, 19 Mar 2006 03:50:14 +0000 Subject: Added nicer message for assert_redirected_to (closes #4294) [court3nay, Chris McGrath] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3969 5ecf4fe2-1ee6-0310-87b1-e25e094e27de --- activesupport/test/core_ext/hash_ext_test.rb | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'activesupport/test') diff --git a/activesupport/test/core_ext/hash_ext_test.rb b/activesupport/test/core_ext/hash_ext_test.rb index a11cef6fc4..3fc3b86254 100644 --- a/activesupport/test/core_ext/hash_ext_test.rb +++ b/activesupport/test/core_ext/hash_ext_test.rb @@ -174,6 +174,10 @@ class HashExtTest < Test::Unit::TestCase def test_reverse_merge assert_equal({ :a => 1, :b => 2, :c => 10 }, { :a => 1, :b => 2 }.reverse_merge({:a => "x", :b => "y", :c => 10}) ) end + + def test_diff + assert_equal({ :a => 2 }, { :a => 2, :b => 5 }.diff({ :a => 1, :b => 5 })) + end end class HashToXmlTest < Test::Unit::TestCase @@ -234,4 +238,4 @@ class HashToXmlTest < Test::Unit::TestCase xml = { :name => "David", :addresses => [{ :streets => [ { :name => "Paulina" }, { :name => "Paulina" } ] } ] }.to_xml(@xml_options) assert xml.include?(%(
)) end -end \ No newline at end of file +end -- cgit v1.2.3