Sha256: 0baa36524f73100046b1614c718dd01123290a96cd3b57e0cfa8358f980aaf3a

Contents?: true

Size: 974 Bytes

Versions: 16

Compression:

Stored size: 974 Bytes

Contents

require 'assert'
require 'ns-options/assert_macros'

module NsOptions::AssertMacros

  class BaseTests < Assert::Context
    desc "NsOptions::AssertMacros"
    include NsOptions::AssertMacros

    setup do
      @cls = Class.new do
        include NsOptions

        options(:test) do
          option :one
          option :two,   :default => 2
          option :three, :required => true
          option :four,  :args => [5,6,7]
          option :five,  Pathname, :default => '.'

          namespace :more do
            option :seven
          end
        end

      end
    end
    subject { @cls.test }

    should have_namespace :more
    should have_namespaces :more

    should have_options(:one, :two, :three, :four, :five)
    should have_option :one

    should have_option :two,   :default => 2
    should have_option :three, :required => true
    should have_option :four,  :args => [5,6,7]
    should have_option :five,  Pathname, :default => '.'

  end

end

Version data entries

16 entries across 16 versions & 1 rubygems

Version Path
ns-options-1.1.6 test/unit/assert_macros_tests.rb
ns-options-1.1.5 test/unit/assert_macros_tests.rb
ns-options-1.1.4 test/unit/assert_macros_tests.rb
ns-options-1.1.3 test/unit/assert_macros_tests.rb
ns-options-1.1.2 test/unit/assert_macros_tests.rb
ns-options-1.1.1 test/unit/assert_macros_tests.rb
ns-options-1.1.0 test/unit/assert_macros_tests.rb
ns-options-1.0.1 test/unit/assert_macros_tests.rb
ns-options-1.0.0 test/unit/assert_macros_tests.rb
ns-options-1.0.0.rc4 test/unit/assert_macros_tests.rb
ns-options-1.0.0.rc3 test/unit/assert_macros_tests.rb
ns-options-1.0.0.rc2 test/unit/assert_macros_tests.rb
ns-options-1.0.0.rc1 test/unit/assert_macros_tests.rb
ns-options-0.4.1 test/unit/ns-options/assert_macros_test.rb
ns-options-0.4.0 test/unit/ns-options/assert_macros_test.rb
ns-options-0.3.1 test/unit/ns-options/assert_macros_test.rb