This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'tempfile' | |
require 'net/ntlm' | |
require 'kconv' | |
require 'webrobots' | |
## | |
# An HTTP (and local disk access) user agent. This class is an implementation | |
# detail and is subject to change at any time. | |
class Mechanize::HTTP::Agent |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def test_sets_settings_with_hash | |
user = User.create :name => 'Mr. Foo' | |
user.settings[:one] = 1 | |
user.settings[:two] = 2 | |
user.settings = { :two => 'two', :three => 3 } | |
assert_equal 1, user.settings[:one] | |
assert_equal 'two', user.settings[:two] | |
assert_equal 3, user.settings[:three] # ensure existing settings remain intact | |
end |