I’m creating a Ruby (not Rails) script and I have to test using standard Rails unit tests and Cucumber. I can’t use RSpec.
So how do I test a ruby script with Cucumber and Rails Test::Unit? Is it possible?
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.
Here, I created a complete example including a Rakefile for convenience. The file structure is this:
In fact this example doesn’t even use classes, so you can really test typical “Scripts” with it. File contents are here: http://pastebin.com/sJUP7VSA
So in the end you can do this:
Cheers, Philip