Sha256: df5ea38fd9a61c29e33001836ea16b33a040c3d879e0a86f41fe052f3af8aa94

Contents?: true

Size: 564 Bytes

Versions: 1

Compression:

Stored size: 564 Bytes

Contents

require 'compiler_helper'
module Alf
  class Compiler
    describe Default, "rename" do

      subject{
        compiler.call(expr)
      }

      let(:expr){
        rename(an_operand(leaf), a: :b)
      }

      it_should_behave_like "a traceable compiled"

      it 'has a Rename cog' do
        subject.should be_a(Engine::Rename)
      end

      it 'has the correct rename attributes' do
        subject.renaming.should eq(Renaming[a: :b])
      end

      it 'has the correct sub-cog' do
        subject.operand.should be(leaf)
      end

    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
alf-core-0.15.0 spec/unit/alf-compiler/default/test_rename.rb