[rspec-users] newbie cucumber tutorial

aslak hellesoy aslak.hellesoy at gmail.com
Mon Dec 22 06:05:30 EST 2008

On Mon, Dec 22, 2008 at 10:01 AM, Sarah Allen <lists at 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
* "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

Or simpler:
Task.create!(:description => desc)


> 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 at rubyforge.org
> http://rubyforge.org/mailman/listinfo/rspec-users
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://rubyforge.org/pipermail/rspec-users/attachments/20081222/d77edd79/attachment.html>

More information about the rspec-users mailing list