Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to add first Cucumber test to a Rails app

Confession: I have never written a single test for Rails.

I have installed the gems cucumber, rspec, capybara, factory girl. Running Rails 3.1.

I am not sure, um, where to create a new test file or what to name it.

Thanks for your patience.

like image 987
Alan H. Avatar asked Oct 12 '11 02:10

Alan H.


1 Answers

Micheal Hartl has a good tutorial on Rails that is mostly test driven:
http://ruby.railstutorial.org/
You probably know most of this but it will point you in the right direction.

Here's a Rails Cast on Cucumber:
http://railscasts.com/episodes/155-beginning-with-cucumber

Here's an RSpec Rails Cast:
http://railscasts.com/episodes/71-testing-controllers-with-rspec

Here are a bunch of Cucumber examples:
https://github.com/cucumber/cucumber/tree/master/examples/i18n

Hope that helps!

like image 95
Rimian Avatar answered Sep 27 '22 23:09

Rimian