Sha256: 2050c570932120336964b0e8bec6db72744339862c252be8c7941b35fd4aeb8e
Contents?: true
Size: 527 Bytes
Versions: 10
Compression:
Stored size: 527 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.set_result(result) @future.value.should eq(result) end end
Version data entries
10 entries across 10 versions & 1 rubygems