Sha256: 088cab8a2061a234f90075e2b4d289cc6c11b761e1c13b0c47f0a828da8e3934

Contents?: true

Size: 489 Bytes

Versions: 2

Compression:

Stored size: 489 Bytes

Contents

require File.expand_path(File.join(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?
    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

2 entries across 2 versions & 2 rubygems

Version Path
kitamomonga-mechanize-0.9.3.20090724215219 test/test_option.rb
tenderlove-mechanize-0.9.3.20090911221705 test/test_option.rb