Sha256: d45df145c32121df5f5f46eb6603cdcdb34940b38a244e3b85079f59b77683d7

Contents?: true

Size: 575 Bytes

Versions: 1

Compression:

Stored size: 575 Bytes

Contents

require 'spec_helper'
require File.expand_path('../fixtures/classes', __FILE__)

describe 'Veritas::Logic::Predicate#call' do
  subject { predicate.call(tuple) }

  let(:header)    { Relation::Header.new([ [ :id, Integer ] ]) }
  let(:tuple)     { Tuple.new(header, [ 1 ])                   }
  let(:predicate) { PredicateSpecs::Object.new(header[:id], 1) }

  it 'sends the left and right value to self.class.call' do
    response = mock('#call response')
    PredicateSpecs::Object.should_receive(:call).with(1, 1).and_return(response)
    should equal(response)
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
veritas-0.0.1 spec/unit/veritas/logic/predicate/call_spec.rb