Changeset 8363
- Timestamp:
- 12/10/07 05:12:50 (2 years ago)
- Files:
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/activesupport/test/core_ext/class/delegating_attributes_test.rb
r8056 r8363 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 … … 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 trunk/activesupport/test/core_ext/enumerable_test.rb
r7646 r8363 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 } trunk/activesupport/test/ordered_options_test.rb
r7657 r8363 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