Sha256: 3c1453603f3c373619c72580b6e54fe5b8afee1744b1d6306bebec93ccdbd1b3

Contents?: true

Size: 439 Bytes

Versions: 3

Compression:

Stored size: 439 Bytes

Contents

require File.dirname(__FILE__) + "/helper"

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

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

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
mechanize-0.7.6 test/tc_option.rb
mechanize-0.7.7 test/test_option.rb
mechanize-0.7.8 test/test_option.rb