Cucumber/watir on netbeans


#1

require “rubygems”
require “watir”
require “test/unit”
require “gtk2”
require “cucumber”

class TC1_google_search < Test::Unit::TestCase

Given /^that I have gone to the enroll page$/ do
@browser=Watir::IE.new
@browser.goto(“url”)
end

When /^I select “([^”]*)" option$/ do |item|
if item == ‘Residential’
@browser.radio(:id, “client_client_type_residential”).set
else
@browser.radio(:id, “client_client_type_small_business”).set
end
end

Then /^<"(.),"(.)">, should be mentioned in the results$/ do
|item2,item3|
@browser.html.include?(item2,item3).should == true

end

end

when run the cucumber file with netbeans appear this message: undefined
method `Given’ for TC1_google_search:Class (NoMethodError)

maybe because the sentences cucumber it’s into class ?