I'm receiving NoMethodError on Assert, Ruby 1.9.3
I'm new to Ruby, and running this test:
require 'selenium-webdriver'
require 'capybara'
require 'capybara/cucumber'
require 'rspec/expectations'
require 'test/unit'
driver = Selenium::WebDriver.for :firefox
Capybara.default_driver = :selenium
Given /^I am on the homepage$/ do
driver.navigate.to "http://testurl:8080/"
end
When(/^I enter admin authentication$/) do
usrname = > driver.find_element(:name, 'username')
usrname.send_keys "admin"
puts "Username Entered"
passwd = driver.find_element(:name, 'password')
passwd.send_keys "admin"
puts "Password Entered"
passwd.submit
puts "Details Submitted"
end
Then(/^I should be on the homepage$/) do
sleep 5
displayName = driver.find_element(:id, 'prefs_menu')
assert displayName.text == "Administrator" #
puts "Correct User Display Name"
end
And I keep getting the error
undefined method `assert' for #<Object:0x2895258> (NoMethodError)
./features/login_steps.rb:42:in `/^I should be on the homepage$/'
features\login.feature:10:in `Then I should be on the homepage'
Its probably something I'm overlooking completely - but any help?
No comments:
Post a Comment