_______________________________________________
rspec-users mailing list
rspec...@rubyforge.org
http://rubyforge.org/mailman/listinfo/rspec-users
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
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?
On Mon, May 9, 2011 at 3:00 PM, S Ahmed <sahme...@gmail.com> wrote:I'm a bit confused as to how cucumber and rspec integrate (if they d at all?).RSpec is two things:a) A runner (command line program)
b) An assertion library (should, should_not, be_nil and friends)
Cucumber doesn't use a) at all.If you want, you can use b) in your step definitions. If you don't, Cucumber won't use RSpec at all.
Andrew, I've actually read allot of the book (but admittedly I brushed over the cucumber sections), but I was confused at this point.I understand the outside in development, etc.What I was confused at was if the two technologies actually integrate at some point.i.e. if you run cucumber, will it go and run spec's for you also?
Correct me if I am wrong, but the cucumber step definitions do indeed use webrat to hit the pages and verify things in the view pages correct?