I''m trying to get testing setup with Watir (safariwatir) specifically and watir-on-rails. gem list safariwatir (0.3.3) I updated the template here. cat vendor/plugins/watir-on-rails/generators/watir/templates/watir_test.rb looks like this currently. require File.dirname(__FILE__) + ''<%= ''/..'' * class_nesting_depth %>/../test_helper'' class <%= class_name %>Test < ActiveSupport::TestCase include WatirOnRails # Uncomment the following lines to specify a test server. # WatirOnRails defaults to http://localhost:3000 # # server "localhost" # port 3001 # fixtures :foos, :bars def test_nothing_yet browser = open_browser("/") fail "Need to write my Watir on Rails test" end ======= after generating a dummy test, when I do rake:test:watir I get this error amongst the output... NoMethodError: undefined method `require_gem'' for #<SuccessfulLoginTest:0x103616418> What do I need to do to clear this and where''s a good place to do it ! ? -- Posted via http://www.ruby-forum.com/.
can you send us the full error log On Sep 24, 3:47 pm, bingo bob <rails-mailing-l...-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> wrote:> I''m trying to get testing setup with Watir (safariwatir) specifically > and watir-on-rails. > > gem list > safariwatir (0.3.3) > > I updated the template here. > > cat > vendor/plugins/watir-on-rails/generators/watir/templates/watir_test.rb > > looks like this currently. > > require File.dirname(__FILE__) + ''<%= ''/..'' * class_nesting_depth > %>/../test_helper'' > > class <%= class_name %>Test < ActiveSupport::TestCase > include WatirOnRails > > # Uncomment the following lines to specify a test server. > # WatirOnRails defaults tohttp://localhost:3000 > # > # server "localhost" > # port 3001 > > # fixtures :foos, :bars > > def test_nothing_yet > browser = open_browser("/") > fail "Need to write my Watir on Rails test" > end > > =======> > after generating a dummy test, when I do rake:test:watir I get this > error amongst the output... > > NoMethodError: undefined method `require_gem'' for > #<SuccessfulLoginTest:0x103616418> > > What do I need to do to clear this and where''s a good place to do it ! ? > -- > Posted viahttp://www.ruby-forum.com/.
It''s ok, thanks. I guess the plugin is a little out of date. I had to update a couple of bits of code in the vendor dir for the plugin from require_gem to merely "require".. seemed to work. -- Posted via http://www.ruby-forum.com/.