Sha256: 4911808cc258eebbdba6d2d27c3330c51a3215505d6038f567c3808931c26648

Contents?: true

Size: 614 Bytes

Versions: 1

Compression:

Stored size: 614 Bytes

Contents

# encoding: utf-8

require 'spec_helper'

[ :union, :| ].each do |method|
  describe Algebra::Union::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::Union) }

    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/union/methods/union_spec.rb