Sha256: 1a10ca642b385ce15d5bb4d19bd494719b48e2c32af82450b595ecce2917c85b

Contents?: true

Size: 565 Bytes

Versions: 4

Compression:

Stored size: 565 Bytes

Contents

require 'test_helper'

describe 'Internal One Flag' do
  let(:flag)  { :blocked }
  let(:admin) { Order.act_with_flags }
  let(:order) { Order.new }

  def setup
    reset_order
    Order.add_to_flags flag
  end

  it 'test Order.act_with_flags' do
    refute_nil admin
    assert_equal admin, order.class.act_with_flags
  end

  it 'checks definition of methods for flag' do
    msg = "method '#{flag}' not defined'
    assert order.respond_to?("#{flag}"), msg
    assert order.respond_to?("#{flag}?"), msg
    assert order.respond_to?("#{flag}="), msg
  end

end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
act_with_flags-0.1.0 test/internal_one_test.rb
act_with_flags-0.0.7 test/internal_one_test.rb
act_with_flags-0.0.6 test/internal_one_test.rb
act_with_flags-0.0.4 test/internal_one_test.rb