Sha256: 0a63b52bc7632de868c7a5d85ab2d7bc055af06cf1bd6b481ad7618a72501068
Contents?: true
Size: 831 Bytes
Versions: 2
Compression:
Stored size: 831 Bytes
Contents
# encoding: utf-8 require 'spec_helper' describe Axiom::Adapter::Arango::Gateway, '#restrict' do subject { object.restrict(args, &block) } let(:adapter) { mock('Adapter') } let(:relation) { mock('Relation', :restrict => response) } let(:response) { mock('New Relation', :kind_of? => true) } let!(:object) { described_class.new(adapter, relation) } let(:args) { stub } let(:block) { lambda { |context| } } it_should_behave_like 'a unary relation method' it 'forwards the arguments to relation#restrict' do relation.should_receive(:restrict).with(args) subject end it 'forwards the block to relation#restrict' do relation.stub!(:restrict) { |_args, &proc| proc.should equal(block) } subject end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
axiom-arango-adapter-0.0.2 | spec/unit/axiom/adapter/arango/gateway/restrict_spec.rb |
axiom-arango-adapter-0.0.1 | spec/unit/axiom/adapter/arango/gateway/restrict_spec.rb |