Sha256: a8868d4fd3e8cb922f925573acb352732b066f5f4c56ab46ec7c02088d3e475a
Contents?: true
Size: 682 Bytes
Versions: 2
Compression:
Stored size: 682 Bytes
Contents
# encoding: utf-8 require 'spec_helper' describe Optimizer::Algebra::Rename::RenameOperand, '#optimize' do subject { object.optimize } let(:header) { Relation::Header.coerce([[:id, Integer], [:name, String]]) } let(:base) { Relation.new(header, LazyEnumerable.new([[1, 'Dan Kubb']])) } let(:relation) { base.rename(name: :other_name).rename(id: :other_id) } let(:object) { described_class.new(relation) } before do expect(object).to be_optimizable end it { should be_kind_of(Algebra::Rename) } its(:operand) { should be(base) } its(:header) { should == [[:other_id, Integer], [:other_name, String]] } end
Version data entries
2 entries across 2 versions & 1 rubygems