Skip to content

Instantly share code, notes, and snippets.

@s2k
Created March 6, 2012 10:44
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save s2k/1985637 to your computer and use it in GitHub Desktop.
Save s2k/1985637 to your computer and use it in GitHub Desktop.
Watir and a defined constant CONFIG - a failing test case
Loaded suite C:/temp/test_watir_config_constant
Started
F
Finished in 1.156279 seconds.
1) Failure:
test_defined_global_constant_CONFIG_does_not_prevent_creating_a_browser_object(TestConfigConstant) [C:/temp/test_watir_config_constant.rb:9]:
Exception raised:
<#<NoMethodError: undefined method `split' for nil:NilClass>>.
1 tests, 1 assertions, 1 failures, 0 errors, 0 skips
Test run options: --seed 7449
[Finished]
require 'watir'
require 'test/unit'
CONFIG = {}
class TestConfigConstant < Test::Unit::TestCase
def test_defined_global_constant_CONFIG_does_not_prevent_creating_a_browser_object
assert_nothing_raised do | e |
Watir::Browser.new.close
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment