[rspec-users] newbie cucumber tutorial
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:
> 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?
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
Task.create!(:description => desc)
> 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
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the rspec-users