Forum: RSpec Is there a way to generate spec for existing controllers?

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
9f86d25858e625f3390d1173c6a6f2a8?d=identicon&s=25 ty (Guest)
on 2009-03-02 00:38
(Received via mailing list)
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
5d38ab152e1e3e219512a9859fcd93af?d=identicon&s=25 David Chelimsky (Guest)
on 2009-03-02 01:02
(Received via mailing list)
On Sun, Mar 1, 2009 at 7:38 AM, ty <yi2004@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.
Aafa8848c4b764f080b1b31a51eab73d?d=identicon&s=25 Phlip (Guest)
on 2009-03-02 04:14
(Received via mailing list)
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
3880f04333bf8375b44cd6aa135406c7?d=identicon&s=25 Bart Zonneveld (Guest)
on 2009-03-02 15:31
(Received via mailing list)
On 2-mrt-2009, at 4:08, Phlip wrote:

>>> 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
F86901feca747abbb5c6c020362ef2e7?d=identicon&s=25 Zach Dennis (zdennis)
on 2009-03-03 00:43
(Received via mailing list)
On Sun, Mar 1, 2009 at 10:08 PM, Phlip <phlip2005@gmail.com> wrote:
>>> 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
This topic is locked and can not be replied to.