I would like to use assertions in my cucumber tests such as this:
Then /^I am taken to the page for that item$/ do
assert_equal page.find(:xpath, "//h2").text.to_s, $title, "The title you clicked does not match the title on the item page"
end
I have installed the test-unit gem, however, when I run my test, I get this error:
undefined method assert_equal' for # (NoMethodError)
./features/support/web_steps.rb:49:in/^I am taken to the page for that item$/' features/userjourney.feature:15:in `Then I am taken to the page for that item'
After googling for a while, it looks like perhaps I need to install the test-unit-full gem. However, I tried this (using jRuby) and got this error:
ERROR: Error installing test-unit-full: ERROR: Failed to build gem native extension. WARNING: JRuby does not support native extensions or the `mkmf' library. Check
http://kenai.com/projects/jruby/pages/Home for alternatives.
Do I really need the test-unit-full gem in order to use assertions? And secondly, if so, how can I install the gem on jRuby?
Thanks, Rebecca
JavaScript questions and answers, JavaScript questions pdf, JavaScript question bank, JavaScript questions and answers pdf, mcq on JavaScript pdf, JavaScript questions and solutions, JavaScript mcq Test , Interview JavaScript questions, JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)