watir / watir-rspec

Use Watir with RSpec with ease.
MIT License
43 stars 13 forks source link

uninitialized constant Watir::RSpec (NameError) #3

Closed anilreddy closed 11 years ago

anilreddy commented 11 years ago

C:\Ruby193\bin\ruby.exe -e $stdout.sync=true;$stderr.sync=true;load($0=ARGV.shift) C:\Ruby193\bin/rspec "C:/Users/Admin/RubymineProjects/Selenium_Ruby/Google Test/spec/login_spec.rb" --require teamcity/spec/runner/formatter/teamcity/formatter --format Spec::Runner::Formatter::TeamcityFormatter --example "Gmail Login" Testing started at 12:54 AM ... C:/Users/Admin/RubymineProjects/Selenium_Ruby/Google Test/spec/spec_helper.rb:19:in block in <top (required)>': uninitialized constant Watir::RSpec (NameError) from C:/Ruby193/lib/ruby/gems/1.9.1/gems/rspec-core-2.13.1/lib/rspec/core.rb:107:inconfigure' from C:/Users/Admin/RubymineProjects/Selenium_Ruby/Google Test/spec/spec_helper.rb:16:in <top (required)>' from C:/Ruby193/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:inrequire' from C:/Ruby193/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in require' from C:/Users/Admin/RubymineProjects/Selenium_Ruby/Google Test/spec/login_spec.rb:1:in<top (required)>' from C:/Ruby193/lib/ruby/gems/1.9.1/gems/rspec-core-2.13.1/lib/rspec/core/configuration.rb:819:in load' from C:/Ruby193/lib/ruby/gems/1.9.1/gems/rspec-core-2.13.1/lib/rspec/core/configuration.rb:819:inblock in load_spec_files' from C:/Ruby193/lib/ruby/gems/1.9.1/gems/rspec-core-2.13.1/lib/rspec/core/configuration.rb:819:in each' from C:/Ruby193/lib/ruby/gems/1.9.1/gems/rspec-core-2.13.1/lib/rspec/core/configuration.rb:819:inload_spec_files' from C:/Ruby193/lib/ruby/gems/1.9.1/gems/rspec-core-2.13.1/lib/rspec/core/command_line.rb:22:in run' from C:/Ruby193/lib/ruby/gems/1.9.1/gems/rspec-core-2.13.1/lib/rspec/core/runner.rb:80:inrun' from C:/Ruby193/lib/ruby/gems/1.9.1/gems/rspec-core-2.13.1/lib/rspec/core/runner.rb:17:in `block in autorun'

Process finished with exit code 1 Empty test suite.

jarmo commented 11 years ago

Did you add watir-rspec into your Gemfile as shown in the README? If you are not using Bundler, then you need of course to add a require "watir-rspec" line to your spec_helper.rb to load it manually.

Closing this for now since the problem seems to be in the fact that watir-rspec is not loaded.

anilreddy commented 11 years ago

Thanks for the response..plz.. see the below screenshot:

image

jarmo commented 11 years ago

If you added it to your Gemfile into test group then it should be loaded automatically. Does it work if you remove the require statement?

Also, it should be require "watir/rspec" and not require "watir-rspec" as stated above, sorry.