Sha256: 60f3e3967cdac7a1072fa2f4b5e299c97b89efb045c47af4e7abd41addc9e971
Contents?: true
Size: 532 Bytes
Versions: 1
Compression:
Stored size: 532 Bytes
Contents
require 'spec_helper' describe MockRedis::Future do let(:command) { [:get, 'foo'] } let(:result) { 'bar' } before { @future = MockRedis::Future.new(command) } it 'remembers the command' do @future.command.should eq(command) end it 'raises an error if the value is requested before the result is set' do expect { @future.value }.to raise_error(RuntimeError) end it 'returns the value after the result has been set' do @future.store_result(result) @future.value.should eq(result) end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
mock_redis-0.15.0 | spec/commands/future_spec.rb |