in Education by
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)

1 Answer

0 votes
by
You shouldn't need test-unit-full to use assert_equal. Sorry if this is a silly question, but do you have require 'rubygems' gem 'test-unit' require 'test/unit' at the top of your script? I ran into something similar a while ago and it turns out that without the gem call I was using an older version of test-unit that came bundled with ruby1.8, rather than the latest version (2.3.0).

Related questions

0 votes
    Which Azure networking component is the core unit, from which administrators can have full control over IP address ... . Load Balancers 3. Routing Tables 4. Local Network...
asked Sep 22, 2021 in Technology by JackTerrance
+1 vote
    Which Azure networking component is the core unit from which administrators can have full control over IP address ... , name resolution, security settings, and routing rules?...
asked Oct 20, 2020 in Technology by JackTerrance
+1 vote
    Which Azure networking component is the core unit from which administrators can have full control over IP address ... , name resolution, security settings, and routing rules?...
asked Oct 20, 2020 in Technology by JackTerrance
0 votes
    When packaging the application using warbler, the symbolic links are lost and the actual contents the symlink ... for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Feb 25, 2022 in Education by JackTerrance
0 votes
    Ought I to unit test constructors? Say I have a constructor like this: IMapinfoWrapper wrapper; public ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Mar 11, 2022 in Education by JackTerrance
0 votes
    Ought I to unit test constructors? Say I have a constructor like this: IMapinfoWrapper wrapper; public ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Mar 11, 2022 in Education by JackTerrance
0 votes
    Ought I to unit test constructors? Say I have a constructor like this: IMapinfoWrapper wrapper; public ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Mar 11, 2022 in Education by JackTerrance
0 votes
    Ought I to unit test constructors? Say I have a constructor like this: IMapinfoWrapper wrapper; public ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Mar 11, 2022 in Education by JackTerrance
0 votes
    Ought I to unit test constructors? Say I have a constructor like this: IMapinfoWrapper wrapper; public ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Mar 11, 2022 in Education by JackTerrance
0 votes
    Ought I to unit test constructors? Say I have a constructor like this: IMapinfoWrapper wrapper; public ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Mar 11, 2022 in Education by JackTerrance
0 votes
    Closed. This question is opinion-based. It is not currently accepting answers. Want to improve this question ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Mar 5, 2022 in Education by JackTerrance
0 votes
    Closed. This question is opinion-based. It is not currently accepting answers. Want to improve this question ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Mar 5, 2022 in Education by JackTerrance
0 votes
    I want to unit test the code below. I've been working with MSTest and I tried to learn Microsoft ... JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Feb 16, 2022 in Education by JackTerrance
0 votes
    Arrange in order- A. running unit test B. running static code check C. check for code D. Build Package...
asked Mar 7, 2021 in Technology by JackTerrance
0 votes
    I am trying to install apache spark to run locally on my windows machine. I have followed all instructions ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Apr 21, 2022 in Education by JackTerrance
...