Sha256: d80de1b22fdc5d05f272c530f2378ad6f731bbfea7262d37dbc0aec4ab3b4397

Contents?: true

Size: 648 Bytes

Versions: 1

Compression:

Stored size: 648 Bytes

Contents

# encoding: utf-8

require 'spec_helper'
require 'axiom/relation/gateway'

describe Relation::Gateway, '#reverse' do
  subject { object.reverse(args) }

  let(:adapter)  { double('Adapter')                         }
  let(:relation) { double('Relation', reverse: response)     }
  let(:response) { double('New Relation', :kind_of? => true) }
  let!(:object)  { described_class.new(adapter, relation)    }
  let(:args)     { double                                    }

  it_should_behave_like 'a unary relation method'

  it 'forwards the arguments to relation#reverse' do
    expect(relation).to receive(:reverse).with(args)
    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/reverse_spec.rb