Watir testing and watir-on-rails

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.


looks like this currently.

require File.dirname(FILE) + ‘<%= ‘/…’ * class_nesting_depth

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”


after generating a dummy test, when I do rake:test:watir I get this
error amongst the output…

NoMethodError: undefined method `require_gem’ for

What do I need to do to clear this and where’s a good place to do it ! ?

can you send us the full error log

On Sep 24, 3:47 pm, bingo bob [email protected]

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.