Sha256: ec127941fc2e1a9e3aa2c652c098fc8619ee80dadb05a15a969fa5250363ed4a
Contents?: true
Size: 703 Bytes
Versions: 1
Compression:
Stored size: 703 Bytes
Contents
require 'spec_helper' describe Backend::File::JSON do let(:file) { described_class.new 'some/cache/path/to/file' } describe "dump" do it "delegates to the given hash" do hash = stub :hash hash.should_receive(:dump_json).once.with "some/cache/path/to/file.json" file.dump hash end end describe "retrieve" do it "raises" do lambda do file.retrieve end.should raise_error("Can't retrieve from JSON file. Use text file.") end end describe 'to_s' do it 'returns the cache path with the default file extension' do file.to_s.should == 'Backend::File::JSON(some/cache/path/to/file.json)' end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
picky-2.7.0 | spec/lib/backend/file/json_spec.rb |