Sha256: d9f38dabf1a46fb4c7286790083354d806028369113ce95296773dc28e4423f7

Contents?: true

Size: 595 Bytes

Versions: 2

Compression:

Stored size: 595 Bytes

Contents

# encoding: utf-8

require 'spec_helper'

describe Operation::Binary, '#left' do
  subject { object.left }

  let(:described_class) { Class.new { include Operation::Binary } }
  let(:right)           { 'Right'                                 }
  let(:object)          { described_class.new(left, right)        }

  context 'when left operand is frozen' do
    let(:left) { 'Left'.freeze }

    it { should be(left) }
  end

  context 'when left operand is not frozen' do
    let(:left) { 'Left' }

    it { should_not be(left) }

    it { should be_frozen }

    it { should == left }
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
axiom-0.2.0 spec/unit/axiom/operation/binary/left_spec.rb
axiom-0.1.1 spec/unit/axiom/operation/binary/left_spec.rb