Sha256: 296fa6f1298b454a96735e9901a7f0edd2e38501b2e7f495bca818d90f1c56e9
Contents?: true
Size: 1.16 KB
Versions: 2
Compression:
Stored size: 1.16 KB
Contents
# encoding: utf-8 # # This file is part of the elephas gem. Copyright (C) 2013 and above Shogun <shogun_panda@me.com>. # Licensed under the MIT license, which can be found at http://www.opensource.org/licenses/mit-license.php. # require "spec_helper" describe Elephas::Backends::Base do let(:provider) { Elephas::Backends::Base.new } describe ".read" do it "should raise an ArgumentError exception" do expect{ provider.read("KEY") }.to raise_error(ArgumentError) end end describe ".write" do it "should raise an ArgumentError exception" do expect{ provider.write("KEY", "VALUE") }.to raise_error(ArgumentError) end end describe ".delete" do it "should raise an ArgumentError exception" do expect{ provider.delete("KEY") }.to raise_error(ArgumentError) end end describe ".exists?" do it "should raise an ArgumentError exception" do expect{ provider.exists?("KEY") }.to raise_error(ArgumentError) end end describe "#now" do it "return a representation for the current time" do allow(::Time).to receive(:now).and_return(123.456) expect(provider.now).to eq(::Time.now.to_f) end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
elephas-4.2.0 | spec/elephas/providers/base_spec.rb |
elephas-4.1.6 | spec/elephas/providers/base_spec.rb |