Sha256: d24d812a430635c5495cf3f6cc2d2c5d564edbdf9abe2566f56106fc81400ef8

Contents?: true

Size: 629 Bytes

Versions: 1

Compression:

Stored size: 629 Bytes

Contents

# encoding: utf-8

require 'spec_helper'

[ :difference, :- ].each do |method|
  describe Algebra::Difference::Methods, "##{method}" do
    subject { object.send(method, other) }

    let(:described_class) { Relation                                    }
    let(:header)          { [ [ :id, Integer ] ]                        }
    let(:other)           { described_class.new(header, [ [ 2 ] ].each) }
    let(:object)          { described_class.new(header, [ [ 1 ] ].each) }

    it { should be_kind_of(Algebra::Difference) }

    it 'behaves the same as Array#-' do
      should == (object.to_a - other.to_a)
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
veritas-0.0.4 spec/unit/veritas/algebra/difference/methods/difference_spec.rb