Forum: RSpec rspec_scaffold and mocha

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.
jevado (Guest)
on 2009-05-07 21:59
(Received via mailing list)
Hi All,

I have a question about the rspec_scaffold and if it's compatible with
other mocking frameworks.
I just created a blank application and a scaffold of a very basic
model. The specs run fine untill I choose to use mocha in the
spec_helper.

Can somebody please tell me if this is ment to be and if so if there's
an easy way to make the scaffold work with mocha ?

Thanks in advance!
Jeroen
Zach D. (Guest)
on 2009-05-09 08:13
(Received via mailing list)
On Thu, May 7, 2009 at 7:40 AM, jevado <removed_email_address@domain.invalid> 
wrote:
> Hi All,
>
> I have a question about the rspec_scaffold and if it's compatible with
> other mocking frameworks.
> I just created a blank application and a scaffold of a very basic
> model. The specs run fine untill I choose to use mocha in the
> spec_helper.
>
> Can somebody please tell me if this is ment to be and if so if there's
> an easy way to make the scaffold work with mocha ?

RSpec scaffold is not set up produce scaffold for all of the various
mocking libraries. It does so just for what comes with RSpec. I do not
know of a way to simply replace scaffolding w/o providing more
scaffolding (ones for each mocking library) and then adding a flag to
the "script/generate" command to produce scaffolding for
rspec+default, rspec+mocha, rspec+rr, etc.

Also, in addition to this the normal "script/generate rspec" command
could be used to take the same options so it would configure your
spec_helper to run with the appropriate libraries.

I think your idea for scaffolding with different mocking libraries is
a good one. Please open a ticket on lighthouse and let's see if we can
get some more input from others in the community as well as the core
team.

http://rspec.lighthouseapp.com/


>
> Thanks in advance!
> Jeroen
> _______________________________________________
> rspec-users mailing list
> removed_email_address@domain.invalid
> http://rubyforge.org/mailman/listinfo/rspec-users
>



--
Zach D.
http://www.continuousthinking.com (personal)
http://www.mutuallyhuman.com (hire me)
@zachdennis (twitter)
David C. (Guest)
on 2009-05-10 22:44
(Received via mailing list)
On Fri, May 8, 2009 at 9:11 PM, Zach D. <removed_email_address@domain.invalid>
wrote:
>> an easy way to make the scaffold work with mocha ?
> spec_helper to run with the appropriate libraries.
>
> I think your idea for scaffolding with different mocking libraries is
> a good one. Please open a ticket on lighthouse and let's see if we can
> get some more input from others in the community as well as the core
> team.
>
> http://rspec.lighthouseapp.com/

You can go ahead and file a feature request if you like, but given
that there is a GSOC project to deal with rails generators, including
support for rspec, I'm not going to be making any significant changes
to the rspec generators in the short term.

Cheers,
David
This topic is locked and can not be replied to.