Sha256: b54de4099e603b44abdb23dddd7816f34556d4db632ba68160056587c4706288
Contents?: true
Size: 736 Bytes
Versions: 4
Compression:
Stored size: 736 Bytes
Contents
# encoding: utf-8 require 'spec_helper' describe Function, '.rename_attributes' do subject { object.rename_attributes(operand, aliases) } let(:object) { described_class } let(:header) { Relation::Header.new([ [ :id, Integer ] ]) } let(:aliases) { Algebra::Rename::Aliases.coerce(header, :id => :other_id) } context 'with an attribute' do let(:operand) { header[:id] } it { should == Attribute::Integer.new(:other_id) } end context 'with a function' do let(:operand) { header[:id].eq(1) } it { should == Attribute::Integer.new(:other_id).eq(1) } end context 'with a literal' do let(:operand) { 1 } it { should == 1 } end end
Version data entries
4 entries across 4 versions & 1 rubygems