Sha256: 2108bff5fdff97c5d99b7bbf4c74e32221eb5fd787737191f369511dd98a012e
Contents?: true
Size: 864 Bytes
Versions: 1
Compression:
Stored size: 864 Bytes
Contents
# encoding: utf-8 require 'spec_helper' require 'axiom/relation/gateway' describe Relation::Gateway, '#extend' do subject { object.extend(args, &block) } let(:adapter) { double('Adapter') } let(:relation) { double('Relation', extend: response) } let(:response) { double('New Relation', :kind_of? => true) } let!(:object) { described_class.new(adapter, relation) } let(:args) { double } let(:block) { ->(context) {} } it_should_behave_like 'a unary relation method' it 'forwards the arguments to relation#extend' do expect(relation).to receive(:extend).with(args) subject end it 'forwards the block to relation#extend' do expect(relation).to receive(:extend) { |&proc| expect(proc).to equal(block) } subject end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
axiom-do-adapter-0.2.0 | spec/unit/axiom/relation/gateway/extend_spec.rb |