Sha256: 881165dc5d58cbb7c1df848c56724b165a07aaac98d2797360df97157837571d

Contents?: true

Size: 501 Bytes

Versions: 2

Compression:

Stored size: 501 Bytes

Contents

# encoding: utf-8

require 'spec_helper'

describe Relation::Operation::Limit, '#insert' do
  subject { object.insert(other) }

  let(:object)  { described_class.new(operand, 1)             }
  let(:other)   { double('other')                             }
  let(:operand) { Relation.new(header, [[1]]).sort_by(header) }
  let(:header)  { Relation::Header.coerce([[:id, Integer]])   }

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

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
axiom-0.2.0 spec/unit/axiom/relation/operation/limit/insert_spec.rb
axiom-0.1.1 spec/unit/axiom/relation/operation/limit/insert_spec.rb