Sha256: 37edfa5b04f2d63b3152e93cd3fd54718e36fae08732e0c4d9057c51f5d4e8c6

Contents?: true

Size: 424 Bytes

Versions: 7

Compression:

Stored size: 424 Bytes

Contents

require "test_helper"

describe Slop do
  describe ".option_defined?" do
    it "handles bad constant names" do
      assert_equal false, Slop.option_defined?("Foo?Bar")
    end

    it "returns false if the option is not defined" do
      assert_equal false, Slop.option_defined?("FooBar")
    end

    it "returns true if the option is defined" do
      assert_equal true, Slop.option_defined?("String")
    end
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
slop-4.8.0 test/slop_test.rb
slop-4.7.0 test/slop_test.rb
slop-4.6.2 test/slop_test.rb
slop-4.6.1 test/slop_test.rb
slop-4.6.0 test/slop_test.rb
slop-4.5.0 test/slop_test.rb
slop-4.4.3 test/slop_test.rb