Sha256: bbd392a0e1a1c9c10d1aaab1e821b185c4078ffb0aeb880c8cd28c0920cfd35d
Contents?: true
Size: 643 Bytes
Versions: 1
Compression:
Stored size: 643 Bytes
Contents
# encoding: utf-8 require 'spec_helper' describe Function::Unary::Callable, '#call' do subject { object.call(value) } let(:object) { mock('object', :operation => :op).extend(self.class.described_class) } let(:value) { mock('value', :send => response) } let(:response) { mock('response') } it { should equal(response) } it 'uses the operation from the object' do object.should_receive(:operation) subject end it 'delegates the operation to the value' do value.should_receive(:send).with(:op) subject end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
axiom-0.1.0 | spec/unit/axiom/function/unary/callable/call_spec.rb |