Sha256: 43fae1cdd4dde9109642e9eb0fa0e1c4f54f54b10f70d69a6c47850462a8b269

Contents?: true

Size: 537 Bytes

Versions: 1

Compression:

Stored size: 537 Bytes

Contents

# encoding: utf-8

require 'spec_helper'

describe Algebra::Product, '#insert' do
  subject { object.insert(other) }

  let(:object) { described_class.new(left, right)                        }
  let(:other)  { stub('other')                                           }
  let(:left)   { Relation.new([ [ :id, Integer ] ], [ [ 1 ] ])           }
  let(:right)  { Relation.new([ [ :name, String ] ], [ [ 'John Doe' ] ]) }

  specify { expect { subject }.to raise_error(ImmutableRelationError, 'inserting into a product is impossible') }
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
axiom-0.1.0 spec/unit/axiom/algebra/product/insert_spec.rb