Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6058955
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T08:39:25+00:00 2026-05-23T08:39:25+00:00

We now have a considerable size rails(2.3.9) application with 0 rails test cases. (What???).

  • 0

We now have a considerable size rails(2.3.9) application with 0 rails test cases. (What???). Yes. It is possible:).

Moving on, if we want to base our testing on one framework, which one should we pick, cucumber, rspec1 or rails built in testing framework?. The reason I am saying only one framework is because of the complexity in learning and managing multiple frameworks for the same purpose.

Q1: Some of the y2009 SO
questions recommend using rspec
for unit testing
models/controllers and cucumber for
testing views. Is that (as of 23 June
2011) still a valid recommendation?

Q2: Has anybody managed to build all
the test cases they needed on a single
framework(say just Cucumber)?, if
yes,which one?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T08:39:26+00:00Added an answer on May 23, 2026 at 8:39 am

    It’s somewhat a matter of preference, but of the three I would pick rspec or Test::Unit. RSpec has been criticized for being over-engineered lately, but I really like:

    • the matcher syntax (value.should == 1 vs. assert_equal(value, 1))
    • test names not confined to method names (it "does something awesome" { ... } vs def test_it_does_something_awesome; ...; end)

    You can achieve both of these with TestUnit with some supporting libraries with relative ease… but I just prefer to use RSpec.

    When you write code and test, usually (always?) it’s better to start from the outside in: IE, write an integration test (a logged in user clicks a button to add $5.00 item to cart, then checks out, and pays. His credit card should be charged $5.00). So rather than testing specific class behaviors (as you do with unit tests), you’ll want to be creating objects in the database and making get / post / etc. calls that interact with the site in a similar way that the users web browser would, making your test penetrate the entire stack.

    Lately I have liked using Steak inside of RSpec for my integration tests (using Capybara to facilitate the web interaction)

    Once you build up your outer perimeter, then I would recommend you start focusing on the unit tests.

    Unit tests can be fantastic for documenting a class’s behavior. I group them around methods and describe what can be passed to the method, and what I expect to be returned.

    describe Object do
      describe "#method" do
        it "returns 4 when passed 2" do
          ...
        end
       end
    end
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

We have a considerable code base with relatively high test coverage for pages/forms, all
in /usr/local i now have two mysql folders: mysql-5.1.34-osx10.5-x86 mysql-5.1.37-osx10.5-x86_64 is it possible to
Right now I have a considerable amount of would-be magic numbers stored in constants.
i have two numbers 1,2 in one array.Now i want to generate all the
I now have it set up so that when people go to a thank
I now have a running Java program which only lacks of the final step,that
Modern ATL/MFC applications now have access to a new shared pointer class called CAutoPtr,
The javascript code I now have can toggle a single row of data. Whether
Following on from this question I now have code that can attach to a
With help from you guys I now have a script that works like a

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.