Sha256: 54011e66fb696f0ac0130dc26a4745e2485a8bd2d0c430d6cdd2f31d3118257c

Contents?: true

Size: 440 Bytes

Versions: 3

Compression:

Stored size: 440 Bytes

Contents

require "helper"

class OptionTest < MiniTest::Unit::TestCase
  class FakeAttribute < Hash
    attr_reader :inner_text
    def initialize(inner_text)
      @inner_text = inner_text
    end
    alias :has_attribute? :has_key?
    alias :attributes :keys
  end

  def test_option_missing_value
    attribute = FakeAttribute.new('blah')
    option = Mechanize::Form::Option.new(attribute, nil)
    assert_equal('blah', option.value)
  end
end

Version data entries

3 entries across 3 versions & 3 rubygems

Version Path
aai10-mechanize-2.0.1.0 test/test_option.rb
neocoin-mechanize-2.0.2 test/test_option.rb
mechanize-2.0.1 test/test_option.rb