Sha256: 150baf354169af2b4fdde2a4d4595db584bccd8f980ecd94d3e3309f41543ae7

Contents?: true

Size: 436 Bytes

Versions: 6

Compression:

Stored size: 436 Bytes

Contents

require "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?
    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

6 entries across 6 versions & 2 rubygems

Version Path
domo-0.0.4 vendor/bundle/ruby/1.9.1/gems/mechanize-1.0.0/test/test_option.rb
mechanize-2.0 test/test_option.rb
mechanize-2.0.pre.2 test/test_option.rb
mechanize-2.0.pre.1 test/test_option.rb
mechanize-1.0.1.beta.20110107104205 test/test_option.rb
mechanize-1.0.0 test/test_option.rb