Sha256: 067d0599bc2d7d58954974372187719b462a370b8810f2c1ad8801b37f461cf8

Contents?: true

Size: 620 Bytes

Versions: 1

Compression:

Stored size: 620 Bytes

Contents

require File.join(File.dirname(__FILE__), 'spec_helper.rb')


describe 'a volute with an over' do

  before(:each) do

    Volute.clear!

    @package = Package.new

    volute Package do
      volute do
        over if object.delivered
      end
      volute :location do
        (object.comment ||= []) << value
      end
    end
  end

  it 'should prevent evaluation of further volutes' do

    @package.location = 'ZRH'
    @package.location = 'CDG'

    @package.comment.should == %w[ ZRH CDG ]

    @package.delivered = true
    @package.location = 'FCO'

    @package.comment.should == %w[ ZRH CDG ]
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
volute-0.1.1 spec/over_spec.rb