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.

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 ! ?

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.

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs