Sha256: bd9252d8a87b009319ec3dca1371bd0da160ba5fa28b9dfe0b102fcea150e210

Contents?: true

Size: 752 Bytes

Versions: 4

Compression:

Stored size: 752 Bytes

Contents

# encoding: utf-8

require 'spec_helper'

describe Optimizer::Function::Unary, '#operand' do
  subject { object.operand }

  let(:described_class) { Class.new(Optimizer) { include Optimizer::Function::Unary }                    }
  let(:function)        { Class.new(Veritas::Function) { include Veritas::Function::Unary }.new(operand) }
  let(:object)          { described_class.new(function)                                                  }

  context 'when the operand is frozen' do
    let(:operand) { 'Operand'.freeze }

    it { should equal(operand) }
  end

  context 'when the operand is not frozen' do
    let(:operand) { 'Operand' }

    it { should_not equal(operand) }

    it { should be_frozen }

    it { should == operand }
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
veritas-optimizer-0.0.7 spec/unit/veritas/optimizer/function/unary/operand_spec.rb
veritas-optimizer-0.0.6 spec/unit/veritas/optimizer/function/unary/operand_spec.rb
veritas-optimizer-0.0.5 spec/unit/veritas/optimizer/function/unary/operand_spec.rb
veritas-optimizer-0.0.4 spec/unit/veritas/optimizer/function/unary/operand_spec.rb