Sha256: 23822743cd69710ee152985c2b716de09a9a77e1e178d9ffb53ec294192857e5

Contents?: true

Size: 589 Bytes

Versions: 3

Compression:

Stored size: 589 Bytes

Contents

# rubocop: disable all

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

3 entries across 3 versions & 1 rubygems

Version Path
act_with_flags-0.2.4 test/internal_one_test.rb
act_with_flags-0.2.3 test/internal_one_test.rb
act_with_flags-0.2.0 test/internal_one_test.rb