Ticket #1689: fix_more_as_tests.patch
| File fix_more_as_tests.patch, 2.2 kB (added by lifofifo, 10 months ago) |
|---|
-
activesupport/test/ordered_options_test.rb
old new 4 4 def setup 5 5 @keys = %w( blue green red pink orange ) 6 6 @values = %w( 000099 009900 aa0000 cc0066 cc6633 ) 7 @ordered_hash = ActiveSupport::OrderedHash.new(@keys.zip(@values).to_a) 7 @ordered_hash = ActiveSupport::OrderedHash.new 8 9 @keys.each_with_index do |key, index| 10 @ordered_hash[key] = @values[index] 11 end 8 12 end 9 13 10 14 def test_order -
activesupport/test/core_ext/enumerable_test.rb
old new 37 37 end 38 38 39 39 def test_nil_sums 40 expected_raise = RUBY_VERSION < '1.9.0' ? TypeError : NoMethodError40 expected_raise = TypeError 41 41 42 42 assert_raise(expected_raise) { [5, 15, nil].sum } 43 43 -
activesupport/test/core_ext/class/delegating_attributes_test.rb
old new 25 25 # The class and instance should have an accessor, but there 26 26 # should be no mutator 27 27 assert single_class.respond_to?(:only_reader) 28 assert single_class.public_instance_methods. include?("only_reader")28 assert single_class.public_instance_methods.map(&:to_s).include?("only_reader") 29 29 assert !single_class.respond_to?(:only_reader=) 30 30 end 31 31 … … 45 45 # the instance should have an accessor only 46 46 assert single_class.respond_to?(:both) 47 47 assert single_class.respond_to?(:both=) 48 assert single_class.public_instance_methods. include?("both")49 assert !single_class.public_instance_methods. include?("both=")48 assert single_class.public_instance_methods.map(&:to_s).include?("both") 49 assert !single_class.public_instance_methods.map(&:to_s).include?("both=") 50 50 end 51 51 52 52 def test_working_with_simple_attributes