Sha256: df774036f289ac992a1d2f61a7b7e4ba250397dd4799d9f949ebed3696241a09

Contents?: true

Size: 672 Bytes

Versions: 2

Compression:

Stored size: 672 Bytes

Contents

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

describe 'Veritas::Logic::Connective::Unary#call' do
  subject { object.call(tuple) }

  let(:klass)    { UnarySpecs::Object                         }
  let(:header)   { Relation::Header.new([ [ :id, Integer ] ]) }
  let(:operand)  { header[:id].eq(1)                          }
  let(:tuple)    { Tuple.new(header, [ 1 ])                   }
  let(:response) { mock('#call response')                     }
  let(:object)   { klass.new(operand)                         }

  before do
    klass.should_receive(:call).with(true).and_return(response)
  end

  it { should equal(response) }
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
veritas-0.0.2 spec/unit/veritas/logic/connective/unary/call_spec.rb
veritas-0.0.1 spec/unit/veritas/logic/connective/unary/call_spec.rb