Sha256: 46c74a50b3aaca8e20693c294da7c93e5354459d3912131db7eaea7ebd70a57a

Contents?: true

Size: 760 Bytes

Versions: 1

Compression:

Stored size: 760 Bytes

Contents

# encoding: utf-8

require 'spec_helper'

describe Algebra::Projection::Methods, '#remove' do
  subject { object.remove(attributes) }

  let(:described_class) { Relation                                                                                                }
  let(:attributes)      { [ :id ]                                                                                                 }
  let(:object)          { described_class.new([ [ :id, Integer ], [ :name, String ] ], LazyEnumerable.new([ [ 1, 'Dan Kubb' ] ])) }

  it { should be_instance_of(Algebra::Projection) }

  its(:header) { should == [ [ :name, String ] ] }

  it 'behaves the same as Enumerable#map with Tuple#[]' do
    should == object.map { |tuple| [ tuple[:name] ] }
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
axiom-0.1.0 spec/unit/axiom/algebra/projection/methods/remove_spec.rb