How would you make a decision between cucumber and shoulda if you were about to choose a testing framework?
What differentiates these two frameworks primarily?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
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.
As everybody has pointed out, Cucumber and Shoulda have fairly different objectives. You can think of Cucumber as being the “view from 10,000 feet” testing framework – you define a broad feature or specific user interaction and make sure everything works together. Shoulda is for unit testing – you pick out a specific model and thoroughly test all the picky little bits of functionality for that individual piece.
Usually, you would want to use these sort of frameworks in conjunction. For example, most of your broad, high level tests can be written in Cucumber, but when there’s a particularly complex or opaque bit of code in your system, you can drill down with Shoulda or RSpec to test the particulars.