Very nice.... the ability to see your workflow helps me a ton. I guess
I needed to see what other developers did. I have a project that I
started, but then quit until I nailed down the testing. I will have to
catch up on the code I have already written, but I'm grasping the
cucumber and rspec correlation now. On anything new I will start with
Cucumber and then to rspec to iron out the actual code.

Thanks!

Chris

On Jul 16, 12:47 am, Andrew Timberlake <and...@andrewtimberlake.com>
wrote:
> On Thu, Jul 16, 2009 at 7:46 AM,
>
> internetchris<ch...@silhouettesolutions.net> wrote:
> > Tom,
>
> > I appreciate the reply...
>
> > So would I be correct in saying that I should develop all of my spec
> > tests first, and then finish it up by running some cucumber tests?
>
> > Thanks!
>
> > Chris
>
> Chris
>
> If you follow strict Behaviour Driven Development, then the behaviour
> should be defined before the code. Therefore, the Cucumber scenarios
> should come first.
>
> My workflow is like this:
> Write Cucumber scenario - It will fail because the path isn't defined
> Create route entry
> Run Cucumber - It now fails because the controller doesn't exist
> Create controller spec - It will fail because there's no controller
> Create controller
> Spec now fails because required model doesn't exist
> Write model spec - It will fail because model doesn't exist
> Create model
> Flesh out model until model spec passes
> Flesh out controller until controller spec passes
> Continue until Cucumber scenario passes
> Repeat until project is complete :-)
>
> I run autospec so most of the test re-runs are done automatically and
> therefore the process continues a lot more smoothly than it sounds.
> You'll notice that their are no view specs. I don't use view specs 95%
> of the time because Cucumber covers this (previously my view specs
> where just an assertion that the view was there).
> When theirs something very specific I need to ensure is in the view, I
> might add a view spec.
>
> Andrew Timberlakehttp://ramblingsonrails.com
>
> http://MyMvelope.com- The SIMPLE way to manage your savings
> _______________________________________________
> rspec-users mailing list
> rspec-us...@rubyforge.orghttp://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