spec/lib/extensions/hash_spec.rb in picky-0.9.0 vs spec/lib/extensions/hash_spec.rb in picky-0.9.1
- old
+ new
@@ -4,34 +4,34 @@
describe 'dump_to_json' do
it 'uses the right file' do
File.should_receive(:open).once.with('some/file/path.json', 'w')
- {}.dump_to_json 'some/file/path'
+ {}.dump_json 'some/file/path.json'
end
it "uses the right encoder" do
file = stub :file
File.should_receive(:open).and_yield file
Yajl::Encoder.should_receive(:encode).once.with({ :some => :hash }, file)
- { :some => :hash }.dump_to_json 'unimportant'
+ { :some => :hash }.dump_json 'unimportant'
end
end
describe 'dump_to_marshalled' do
it 'uses the right file' do
File.should_receive(:open).once.with('some/file/path.dump', 'w:binary')
- {}.dump_to_marshalled 'some/file/path'
+ {}.dump_marshalled 'some/file/path.dump'
end
it "uses the right encoder" do
file = stub :file
File.should_receive(:open).and_yield file
Marshal.should_receive(:dump).once.with({ :some => :hash }, file)
- { :some => :hash }.dump_to_marshalled 'unimportant'
+ { :some => :hash }.dump_marshalled 'unimportant'
end
end
describe "to_json" do
before(:each) do
\ No newline at end of file