Sha256: 0d44f7b859a3e39e0267781ff10f2195a18e6756bca16347fcab3a72702989bb

Contents?: true

Size: 866 Bytes

Versions: 4

Compression:

Stored size: 866 Bytes

Contents

# encoding: utf-8

require 'spec_helper'

describe Optimizer::Function::Binary, '#right' do
  subject { object.right }

  let(:described_class) { Class.new(Optimizer) { include Optimizer::Function::Binary }                        }
  let(:left)            { 'Left'                                                                              }
  let(:function)        { Class.new(Veritas::Function) { include Veritas::Function::Binary }.new(left, right) }
  let(:object)          { described_class.new(function)                                                       }

  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

4 entries across 4 versions & 1 rubygems

Version Path
veritas-optimizer-0.0.7 spec/unit/veritas/optimizer/function/binary/right_spec.rb
veritas-optimizer-0.0.6 spec/unit/veritas/optimizer/function/binary/right_spec.rb
veritas-optimizer-0.0.5 spec/unit/veritas/optimizer/function/binary/right_spec.rb
veritas-optimizer-0.0.4 spec/unit/veritas/optimizer/function/binary/right_spec.rb