Sha256: 3e65b279f7be8e80a48ec220ddb0e2438b4dfe911bfef485deb4d687aa040ab2

Contents?: true

Size: 674 Bytes

Versions: 1

Compression:

Stored size: 674 Bytes

Contents

require 'spec_helper'

describe 'Veritas::Optimizer::Logic::Predicate#right' do
  subject { object.right }

  let(:klass)     { Optimizer::Logic::Predicate                  }
  let(:left)      { 'Left'                                       }
  let(:predicate) { Class.new(Logic::Predicate).new(left, right) }
  let(:object)    { klass.new(predicate)                         }

  context 'when right operand is frozen' do
    let(:right) { 'Right'.freeze }

    it { should equal(right) }
  end

  context 'when right operand is not frozen' do
    let(:right) { 'Right' }

    it { should_not equal(right) }

    it { should be_frozen }

    it { should == right }
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
veritas-0.0.2 spec/unit/veritas/optimizer/logic/predicate/right_spec.rb