Rspec_scaffold and mocha


#1

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


#2

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


#3

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)