Sha256: 825abbd5046f7cdf78c6ff94d5d61a5d40517a15d98a08c87e296adbca175886
Contents?: true
Size: 825 Bytes
Versions: 2
Compression:
Stored size: 825 Bytes
Contents
# encoding: utf-8 require 'spec_helper' describe Axiom::Adapter::Arango::Gateway, '#sort_by' do subject { object.sort_by(args, &block) } let(:adapter) { mock('Adapter') } let(:relation) { mock('Relation', :sort_by => 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#sort_by' do relation.should_receive(:sort_by).with(args) subject end it 'forwards the block to relation#sort_by' do relation.stub!(:sort_by) { |_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/sort_by_spec.rb |
axiom-arango-adapter-0.0.1 | spec/unit/axiom/adapter/arango/gateway/sort_by_spec.rb |