spec/momm/redis_store_spec.rb in momm-0.0.7 vs spec/momm/redis_store_spec.rb in momm-1.0.0
- old
+ new
@@ -1,37 +1,39 @@
require 'spec_helper'
describe Momm::RedisStore do
context 'default configurations' do
it 'default options should be correct' do
- Momm::RedisStore::DEFAULT_OPTIONS.should == {
- host: "localhost", port: 6379, namespace: "momm"
- }
+ expect(Momm::RedisStore::DEFAULT_OPTIONS).to eq({
+ host: "localhost",
+ port: 6379,
+ namespace: "momm"
+ })
end
end
context '#initialize' do
it 'can be initialized without params passed in' do
momm = Momm::RedisStore.new
- momm.client.should be_a(Redis::Namespace)
+ expect(momm.client).to be_a(Redis::Namespace)
end
it 'can be initialized' do
momm = Momm::RedisStore.new host: "localhost",
port: 6379, namespace: "momm"
- momm.client.should be_a(Redis::Namespace)
+ expect(momm.client).to be_a(Redis::Namespace)
end
end
describe '#set & #get' do
it 'can set and get' do
calc = Momm::Calculator.new Momm::RedisStore.new
money = rand(20)
calc.set_rate :USD, money
- calc.get_rate(:USD).should == money
+ expect(calc.get_rate(:USD)).to eq money
Momm.update!
end
end
-end
\ No newline at end of file
+end