On Mon, Dec 22, 2008 at 10:01 AM, Sarah Allen <li...@ruby-forum.com> wrote:
> I got started with cucumber and it sure is fun. I've written up my > initial experience in tutorial format here for any newbies who want to > follow in my tracks: > http://www.ultrasaurus.com/code/2008/12/rails-2-day-3.html > > If anyone has any corrections, let me know. I was wondering whether > when writing a real application, do you usually write your whole spec > with lots of scenarios at once and then get them the execute one at a > time? or do you write and code one scenario at a time? > Hi Sarah, Thanks for the great writeup. It is simple to follow and explains what's going on really well. I have a few comments: * I released 0.1.13 yesterday. In the Rails installation wiki page I recommend using my webrat gem. It lets you use response.should have_selector(...) (You're not using it in your tutorial, but just in case...) * "Write a Spec" should be "Write a feature" (specs is confusing here because that is what people use RSpec for. describe and it style). There are some other refs to "spec" which should be "feature". * Use bang! methods when creating records. Otherwise a failure to create will silently pass without you knowing. Example: task = Task.new(:description => desc) # Lose the semicolon task.save! Or simpler: Task.create!(:description => desc) Cheers, Aslak > > Thanks, > Sarah > > p.s. what is the relationship between cucumber and RSpec? > -- > Posted via http://www.ruby-forum.com/. > _______________________________________________ > rspec-users mailing list > rspec-users@rubyforge.org > http://rubyforge.org/mailman/listinfo/rspec-users >
_______________________________________________ rspec-users mailing list rspec-users@rubyforge.org http://rubyforge.org/mailman/listinfo/rspec-users