Feature and scenario are aliases defined by capybara.
On Jul 16, 2012 5:50 AM, "Matt Wynne" <m...@mattwynne.net> wrote:

>
> On 16 Jul 2012, at 02:28, Mike Glaz wrote:
>
> Describe, context, feature, scenario: what is the difference between the
> four and when do I use each one?
>
>
> Feature and Scenario are Cucumber keywords and AFAIK have nothing to do
> with RSpec.
>
> #describe and #context are both aliases for the same method which creates
> a new (anonymous) subclass of RSpec::ExampleGroup. This is essentially the
> same thing as sublcassing Test::Unit::TestCase as you would in a bog
> standard test-unit test.
>
> So #describe and #context do the same thing. I tend to use #describe on
> the top level (what is the thing I'm describing in this spec), then use
> #context inside that to explain the different hoops I'm making that thing
> jump through in my examples.
>
> cheers,
> Matt
>
> --
> Freelance programmer & coach
> Author, http://pragprog.com/book/hwcuc/the-cucumber-book
> Founder, http://www.relishapp.com/
> Twitter, https://twitter.com/mattwynne
>
>
>
> _______________________________________________
> 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

Reply via email to