Sha256: 200701ef668fa47e123973a00f0f5cfa4a2fa6e31bdf0a46c7862a9da1b6f116

Contents?: true

Size: 710 Bytes

Versions: 2

Compression:

Stored size: 710 Bytes

Contents

require 'assert'
require 'enumeration/assert_macros'

module Enumeration::AssertMacros

  class UnitTests < Assert::Context
    include Enumeration::AssertMacros

    desc "Enumeration::AssertMacros"
    setup do
      @enum_class = Class.new do
        include Enumeration

        enum :list, %w{aye bee see}

        enum :map, {
          :a => "aye",
          :b => "bee",
          :c => "see"
        }
      end
      @enum = @enum_class.new
    end
    subject{ @enum }

    should have_enum :list
    should have_enum :list, ['aye', 'bee', 'see']
    should have_enum :list, 'aye', 'bee', 'see'

    should have_enum :map
    should have_enum :map, :a => "aye", :b => "bee", :c => "see"

  end

end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
enumeration-1.3.3 test/unit/assert_macros_tests.rb
enumeration-1.3.2 test/unit/assert_macros_tests.rb