On 9 May 2011, at 16:00, S Ahmed wrote:

> I'm a bit confused as to how cucumber and rspec integrate (if they d at all?).
> 
> You write a cucumber feature, and step definitions.
> Now in the step definitions, do you write rspec in the step definitions or do 
> they somehow link to the spec's written elsewhere?

You write *Ruby* code in the step definitions. Because Cucumber is a testing 
tool, you often want to make assertions in that Ruby code about how the system 
you're testing is behaving. RSpec gives you assertions, so you can use RSpec's 
assertions in your step definitions. You can also use Ruby's own built-in 
assertions from the Test::Unit::Assertions namespace.

cheers,
Matt

--
Freelance programmer & coach
Founder, http://relishapp.com
+44(0)7974430184 | http://twitter.com/mattwynne

_______________________________________________
rspec-users mailing list
rspec-users@rubyforge.org
http://rubyforge.org/mailman/listinfo/rspec-users

Reply via email to