Sha256: 0c651f0e6961ea5d11bed702f464157c4e1a9e045b258015c2ae2301f2c6fd5c
Contents?: true
Size: 1.16 KB
Versions: 1
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@cowtech.it>. # 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
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
elephas-4.2.1 | spec/elephas/providers/base_spec.rb |