ty
2009-Mar-01 13:38 UTC
[rspec-users] Is there a way to generate spec for existing controllers?
Hi list, We just start using RSpec and rspec_on_rails for a existing Rails project. After run script/generate rspec. It only generate the structure folders. We''ve got quite a few controllers and models. I wonder is it a way to auto-generate specs for them. Many thanks ty
David Chelimsky
2009-Mar-01 23:51 UTC
[rspec-users] Is there a way to generate spec for existing controllers?
On Sun, Mar 1, 2009 at 7:38 AM, ty <yi2004 at gmail.com> wrote:> Hi list, > > We just start using RSpec and rspec_on_rails for a existing Rails > project. > After run script/generate rspec. It only generate the structure > folders. > We''ve got quite a few controllers and models. I wonder is it a way to > auto-generate specs for them.Nope. Sorry.> > Many thanks > > ty > _______________________________________________ > rspec-users mailing list > rspec-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/rspec-users >
Phlip
2009-Mar-02 03:08 UTC
[rspec-users] Is there a way to generate spec for existing controllers?
David Chelimsky wrote:> ty wrote:>> We just start using RSpec and rspec_on_rails for a existing Rails >> project.No unit tests, right?>> After run script/generate rspec. It only generate the structure >> folders. >> We''ve got quite a few controllers and models. I wonder is it a way to >> auto-generate specs for them. > > Nope. Sorry.Ask your goal-donor what feature they''d like to see in a spec. That is the point of specs - writing verbiage that a "product manager" or "business analyst" can review. -- Phlip
Bart Zonneveld
2009-Mar-02 14:18 UTC
[rspec-users] Is there a way to generate spec for existing controllers?
On 2-mrt-2009, at 4:08, Phlip wrote:> David Chelimsky wrote: > >> ty wrote: > >>> We just start using RSpec and rspec_on_rails for a existing Rails >>> project. > > No unit tests, right? > >>> After run script/generate rspec. It only generate the structure >>> folders. >>> We''ve got quite a few controllers and models. I wonder is it a >>> way to >>> auto-generate specs for them. >> Nope. Sorry. > > Ask your goal-donor what feature they''d like to see in a spec. > > That is the point of specs - writing verbiage that a "product > manager" or "business analyst" can review.I fully agree. For views though, there is http://github.com/hashrocket/view_specify/ tree/master Haven''t tried it, and never will :). cheers, bartz
Zach Dennis
2009-Mar-02 23:36 UTC
[rspec-users] Is there a way to generate spec for existing controllers?
On Sun, Mar 1, 2009 at 10:08 PM, Phlip <phlip2005 at gmail.com> wrote:> David Chelimsky wrote: > >> ty wrote: > >>> We just start using RSpec and rspec_on_rails for a existing Rails >>> project. > > No unit tests, right? > >>> After run script/generate rspec. It only generate the structure >>> folders. >>> We''ve got quite a few controllers and models. I wonder is it a way to >>> auto-generate specs for them. >> >> Nope. Sorry. > > Ask your goal-donor what feature they''d like to see in a spec. > > That is the point of specs - writing verbiage that a "product manager" or > "business analyst" can review.I think you''re referring to business specs, and I think ty is asking about developer specs. You probably meant to refer him to writing features, no? -- Zach Dennis http://www.continuousthinking.com http://www.mutuallyhuman.com