File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 44
55### Bug fixes
66
7- ...
7+ * Revert added alias to_h for to_hash ( [ # 277 ] ( https://github.com/railsconfig/config/issues/277 ) )
88
99### Changes
1010
Original file line number Diff line number Diff line change @@ -123,8 +123,6 @@ def to_hash
123123 result
124124 end
125125
126- alias :to_h :to_hash
127-
128126 def each ( *args , &block )
129127 marshal_dump . each ( *args , &block )
130128 end
Original file line number Diff line number Diff line change 8080 expect ( config [ :section ] [ :servers ] [ 1 ] ) . to be_kind_of ( Config ::Options )
8181 end
8282
83- it "should convert to a hash without modifying nested settings" do
84- config = Config . load_files ( "#{ fixture_path } /development.yml" )
85- config . to_h
86- expect ( config ) . to be_kind_of ( Config ::Options )
87- expect ( config [ :section ] ) . to be_kind_of ( Config ::Options )
88- expect ( config [ :section ] [ :servers ] [ 0 ] ) . to be_kind_of ( Config ::Options )
89- expect ( config [ :section ] [ :servers ] [ 1 ] ) . to be_kind_of ( Config ::Options )
90- end
91-
9283 it "should convert to a json" do
9384 config = Config . load_files ( "#{ fixture_path } /development.yml" ) . to_json
9485 expect ( JSON . parse ( config ) [ "section" ] [ "servers" ] ) . to be_kind_of ( Array )
You can’t perform that action at this time.
0 commit comments