File tree Expand file tree Collapse file tree 1 file changed +7
-8
lines changed Expand file tree Collapse file tree 1 file changed +7
-8
lines changed Original file line number Diff line number Diff line change 11# frozen_string_literal: true
22
3-
43class InheritingHashTest < ActiveSupport ::TestCase
54 def setup
6- @parent = ActiveResource ::InheritingHash . new ( { override_me : ' foo' , parent_key : ' parent_value' } )
7- @child = ActiveResource ::InheritingHash . new ( @parent )
8- @child [ :override_me ] = ' bar'
9- @child [ :child_only ] = ' baz'
5+ @parent = ActiveResource ::InheritingHash . new ( { override_me : " foo" , parent_key : " parent_value" } )
6+ @child = ActiveResource ::InheritingHash . new ( @parent )
7+ @child [ :override_me ] = " bar"
8+ @child [ :child_only ] = " baz"
109 end
1110
1211 def test_child_key_overrides_parent_key
13- assert_equal ' bar' , @child [ :override_me ]
12+ assert_equal " bar" , @child [ :override_me ]
1413 end
1514
1615 def test_parent_key_available_on_lookup
17- assert_equal ' parent_value' , @child [ :parent_key ]
16+ assert_equal " parent_value" , @child [ :parent_key ]
1817 end
1918
2019 def test_conversion_to_regular_hash_includes_parent_keys
2120 hash = @child . to_hash
2221
2322 assert_equal 3 , hash . keys . length
24- assert_equal ' parent_value' , hash [ :parent_key ]
23+ assert_equal " parent_value" , hash [ :parent_key ]
2524 end
2625end
You can’t perform that action at this time.
0 commit comments