Forum: Rails-ES Cucumber/watir on netbeans

Db595276eed0122fc48fb38e3044c7cd?d=identicon&s=25 sasgho sasgho (sasgho)
on 2012-06-20 21:36
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 ?
This topic is locked and can not be replied to.