Sha256: a864600a63d272da14a088a9f938fe4fd900c041956890d1f646639f474cfd2d

Contents?: true

Size: 526 Bytes

Versions: 1

Compression:

Stored size: 526 Bytes

Contents

require 'spec_helper'

[ :union, :| ].each do |method|
  describe "Veritas::Algebra::Union::Methods##{method}" do
    subject { object.send(method, other) }

    let(:klass)  { Relation                          }
    let(:header) { [ [ :id, Integer ] ]              }
    let(:other)  { klass.new(header, [ [ 2 ] ].each) }
    let(:object) { klass.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.2 spec/unit/veritas/algebra/union/methods/union_spec.rb