|
View:
New views
20 Messages
—
Rating Filter:
Alert me
|
| < Prev | 1 - 2 | Next > |
|
|
mock frameworkI'd like to ditch rspec's mock framework and let ppl use mocha or
flexmock or RR (or others). RSpec's mocking framework doesn't really offer anything above those frameworks, and it's therefore an unnecessary burden to maintain. Here's my thinking: We break spec/mocks out into a separate project and release the one and only release when we release rspec 1.1. If you want to continue to use rspec mocks you can do so but you'll have to declare it in spec_helper (or somewhere global), but spec/mocks will be deprecated, and people would be encouraged to start using other frameworks. This isn't a slam dunk, btw - there are some dependencies on rspec's mock framework in the rails plugin that would have to be addressed with either one-off solutions or adapters for the other frameworks. One thing I do NOT want to do is have RSpec prefer one framework over another. Thoughts? _______________________________________________ rspec-devel mailing list rspec-devel@... http://rubyforge.org/mailman/listinfo/rspec-devel |
|
|
Re: mock frameworkOn 8/22/07, David Chelimsky <dchelimsky@...> wrote:
> I'd like to ditch rspec's mock framework and let ppl use mocha or > flexmock or RR (or others). RSpec's mocking framework doesn't really > offer anything above those frameworks, and it's therefore an > unnecessary burden to maintain. > > Here's my thinking: > > We break spec/mocks out into a separate project and release the one > and only release when we release rspec 1.1. > > If you want to continue to use rspec mocks you can do so but you'll > have to declare it in spec_helper (or somewhere global), but > spec/mocks will be deprecated, and people would be encouraged to start > using other frameworks. > > This isn't a slam dunk, btw - there are some dependencies on rspec's > mock framework in the rails plugin that would have to be addressed > with either one-off solutions or adapters for the other frameworks. > One thing I do NOT want to do is have RSpec prefer one framework over > another. > > Thoughts? You mean throw away code that we all worked hard to make as good as possible? Sounds good to me. +1 Ja. If we break it out to a separate project, can I recommend we move it to a separate RubyForge project at the same time? Yurii has registered rspec-ext (RSpec Extras), which is currently empty. I've been thinking about moving Spec::Ui and Spec::Distributed there. All these sub projects could share the same svn, but with their own trunk/tags/branches structure. This would allow for separate release cycles. We could put Spec::Mock here. Aslak > _______________________________________________ > rspec-devel mailing list > rspec-devel@... > http://rubyforge.org/mailman/listinfo/rspec-devel > _______________________________________________ rspec-devel mailing list rspec-devel@... http://rubyforge.org/mailman/listinfo/rspec-devel |
|
|
Re: mock frameworkOn 8/22/07, aslak hellesoy <aslak.hellesoy@...> wrote:
> On 8/22/07, David Chelimsky <dchelimsky@...> wrote: > > I'd like to ditch rspec's mock framework and let ppl use mocha or > > flexmock or RR (or others). RSpec's mocking framework doesn't really > > offer anything above those frameworks, and it's therefore an > > unnecessary burden to maintain. > > > > Here's my thinking: > > > > We break spec/mocks out into a separate project and release the one > > and only release when we release rspec 1.1. > > > > If you want to continue to use rspec mocks you can do so but you'll > > have to declare it in spec_helper (or somewhere global), but > > spec/mocks will be deprecated, and people would be encouraged to start > > using other frameworks. > > > > This isn't a slam dunk, btw - there are some dependencies on rspec's > > mock framework in the rails plugin that would have to be addressed > > with either one-off solutions or adapters for the other frameworks. > > One thing I do NOT want to do is have RSpec prefer one framework over > > another. > > > > Thoughts? > > You mean throw away code that we all worked hard to make as good as possible? > Sounds good to me. +1 Ja. > > If we break it out to a separate project, can I recommend we move it > to a separate RubyForge project at the same time? Yurii has registered > rspec-ext (RSpec Extras), which is currently empty. I've been > thinking about moving Spec::Ui and Spec::Distributed there. All these > sub projects could share the same svn, but with their own > trunk/tags/branches structure. This would allow for separate release > cycles. We could put Spec::Mock here. As long as Yurii is on board that's fine. > > Aslak > > > _______________________________________________ > > rspec-devel mailing list > > rspec-devel@... > > http://rubyforge.org/mailman/listinfo/rspec-devel > > > _______________________________________________ > rspec-devel mailing list > rspec-devel@... > http://rubyforge.org/mailman/listinfo/rspec-devel > rspec-devel mailing list rspec-devel@... http://rubyforge.org/mailman/listinfo/rspec-devel |
|
|
Re: mock frameworkOn 8/22/07, David Chelimsky <dchelimsky@...> wrote:
> On 8/22/07, aslak hellesoy <aslak.hellesoy@...> wrote: > > On 8/22/07, David Chelimsky <dchelimsky@...> wrote: > > > I'd like to ditch rspec's mock framework and let ppl use mocha or > > > flexmock or RR (or others). RSpec's mocking framework doesn't really > > > offer anything above those frameworks, and it's therefore an > > > unnecessary burden to maintain. > > > > > > Here's my thinking: > > > > > > We break spec/mocks out into a separate project and release the one > > > and only release when we release rspec 1.1. > > > > > > If you want to continue to use rspec mocks you can do so but you'll > > > have to declare it in spec_helper (or somewhere global), but > > > spec/mocks will be deprecated, and people would be encouraged to start > > > using other frameworks. > > > > > > This isn't a slam dunk, btw - there are some dependencies on rspec's > > > mock framework in the rails plugin that would have to be addressed > > > with either one-off solutions or adapters for the other frameworks. > > > One thing I do NOT want to do is have RSpec prefer one framework over > > > another. > > > > > > Thoughts? > > > > You mean throw away code that we all worked hard to make as good as possible? > > Sounds good to me. +1 Ja. > > > > If we break it out to a separate project, can I recommend we move it > > to a separate RubyForge project at the same time? Yurii has registered > > rspec-ext (RSpec Extras), which is currently empty. I've been > > thinking about moving Spec::Ui and Spec::Distributed there. All these > > sub projects could share the same svn, but with their own > > trunk/tags/branches structure. This would allow for separate release > > cycles. We could put Spec::Mock here. > > As long as Yurii is on board that's fine. > He is :-) Aslak > > > > Aslak > > > > > _______________________________________________ > > > rspec-devel mailing list > > > rspec-devel@... > > > http://rubyforge.org/mailman/listinfo/rspec-devel > > > > > _______________________________________________ > > rspec-devel mailing list > > rspec-devel@... > > http://rubyforge.org/mailman/listinfo/rspec-devel > > > _______________________________________________ > rspec-devel mailing list > rspec-devel@... > http://rubyforge.org/mailman/listinfo/rspec-devel > rspec-devel mailing list rspec-devel@... http://rubyforge.org/mailman/listinfo/rspec-devel |
|
|
Re: mock frameworkDavid Chelimsky wrote:
> I'd like to ditch rspec's mock framework and let ppl use mocha or > flexmock or RR (or others). RSpec's mocking framework doesn't really > offer anything above those frameworks, and it's therefore an > unnecessary burden to maintain. +1! I currently use rspec's mocks because they're the default, but I'd have no problems switching frameworks. If there's no good reason to have our own, let's not have our own. Jay _______________________________________________ rspec-devel mailing list rspec-devel@... http://rubyforge.org/mailman/listinfo/rspec-devel |
|
|
Re: mock frameworkOn Aug 22, 2007, at 8:20 AM, Jay Levitt wrote: > David Chelimsky wrote: >> I'd like to ditch rspec's mock framework and let ppl use mocha or >> flexmock or RR (or others). RSpec's mocking framework doesn't really >> offer anything above those frameworks, and it's therefore an >> unnecessary burden to maintain. > +1! I currently use rspec's mocks because they're the default, but > I'd > have no problems switching frameworks. If there's no good reason to > have our own, let's not have our own. > > Jay > +1, and +1 to moving things like Spec:UI and Spec:distributed. I would suggest keeping the literature on mocking, with minor modifications. The tight integration with mocking, and the pushing the ideas in the literature is what got my team and I to use it. The current Rails literature really only shows mocks as a way to mock out an external project, but I think it is good to use it to isolate tests as well. I think that is proper BDD, too. JIm > > _______________________________________________ > rspec-devel mailing list > rspec-devel@... > http://rubyforge.org/mailman/listinfo/rspec-devel _______________________________________________ rspec-devel mailing list rspec-devel@... http://rubyforge.org/mailman/listinfo/rspec-devel |
|
|
Re: mock frameworkOn Aug 22, 2007, at 6:11 PM, David Chelimsky wrote: > On 8/22/07, aslak hellesoy <aslak.hellesoy@...> wrote: >> On 8/22/07, David Chelimsky <dchelimsky@...> wrote: >>> I'd like to ditch rspec's mock framework and let ppl use mocha or >>> flexmock or RR (or others). RSpec's mocking framework doesn't really >>> offer anything above those frameworks, and it's therefore an >>> unnecessary burden to maintain. >>> >>> Here's my thinking: >>> >>> We break spec/mocks out into a separate project and release the one >>> and only release when we release rspec 1.1. >>> >>> If you want to continue to use rspec mocks you can do so but you'll >>> have to declare it in spec_helper (or somewhere global), but >>> spec/mocks will be deprecated, and people would be encouraged to >>> start >>> using other frameworks. >>> >>> This isn't a slam dunk, btw - there are some dependencies on rspec's >>> mock framework in the rails plugin that would have to be addressed >>> with either one-off solutions or adapters for the other frameworks. >>> One thing I do NOT want to do is have RSpec prefer one framework >>> over >>> another. >>> >>> Thoughts? >> >> You mean throw away code that we all worked hard to make as good >> as possible? >> Sounds good to me. +1 Ja. >> >> If we break it out to a separate project, can I recommend we move it >> to a separate RubyForge project at the same time? Yurii has >> registered >> rspec-ext (RSpec Extras), which is currently empty. I've been >> thinking about moving Spec::Ui and Spec::Distributed there. All these >> sub projects could share the same svn, but with their own >> trunk/tags/branches structure. This would allow for separate release >> cycles. We could put Spec::Mock here. > > As long as Yurii is on board that's fine. > Just say whom I should add to project admins. Y. _______________________________________________ rspec-devel mailing list rspec-devel@... http://rubyforge.org/mailman/listinfo/rspec-devel |
|
|
Re: mock frameworkOn 8/22/07, Yurii Rashkovskii <yrashk@...> wrote:
> > On Aug 22, 2007, at 6:11 PM, David Chelimsky wrote: > > > On 8/22/07, aslak hellesoy <aslak.hellesoy@...> wrote: > >> On 8/22/07, David Chelimsky <dchelimsky@...> wrote: > >>> I'd like to ditch rspec's mock framework and let ppl use mocha or > >>> flexmock or RR (or others). RSpec's mocking framework doesn't really > >>> offer anything above those frameworks, and it's therefore an > >>> unnecessary burden to maintain. > >>> > >>> Here's my thinking: > >>> > >>> We break spec/mocks out into a separate project and release the one > >>> and only release when we release rspec 1.1. > >>> > >>> If you want to continue to use rspec mocks you can do so but you'll > >>> have to declare it in spec_helper (or somewhere global), but > >>> spec/mocks will be deprecated, and people would be encouraged to > >>> start > >>> using other frameworks. > >>> > >>> This isn't a slam dunk, btw - there are some dependencies on rspec's > >>> mock framework in the rails plugin that would have to be addressed > >>> with either one-off solutions or adapters for the other frameworks. > >>> One thing I do NOT want to do is have RSpec prefer one framework > >>> over > >>> another. > >>> > >>> Thoughts? > >> > >> You mean throw away code that we all worked hard to make as good > >> as possible? > >> Sounds good to me. +1 Ja. > >> > >> If we break it out to a separate project, can I recommend we move it > >> to a separate RubyForge project at the same time? Yurii has > >> registered > >> rspec-ext (RSpec Extras), which is currently empty. I've been > >> thinking about moving Spec::Ui and Spec::Distributed there. All these > >> sub projects could share the same svn, but with their own > >> trunk/tags/branches structure. This would allow for separate release > >> cycles. We could put Spec::Mock here. > > > > As long as Yurii is on board that's fine. > > > > Just say whom I should add to project admins. > Me please :-) > Y. > _______________________________________________ > rspec-devel mailing list > rspec-devel@... > http://rubyforge.org/mailman/listinfo/rspec-devel > _______________________________________________ rspec-devel mailing list rspec-devel@... http://rubyforge.org/mailman/listinfo/rspec-devel |
|
|
Re: mock framework+1, but what framework will rspec's generators use? Should there be
a translator? and what framework should the translator translate to? Carl On Aug 22, 2007, at 8:40 AM, Jim Deville wrote: > > On Aug 22, 2007, at 8:20 AM, Jay Levitt wrote: > >> David Chelimsky wrote: >>> I'd like to ditch rspec's mock framework and let ppl use mocha or >>> flexmock or RR (or others). RSpec's mocking framework doesn't really >>> offer anything above those frameworks, and it's therefore an >>> unnecessary burden to maintain. >> +1! I currently use rspec's mocks because they're the default, but >> I'd >> have no problems switching frameworks. If there's no good reason to >> have our own, let's not have our own. >> >> Jay >> > > +1, and +1 to moving things like Spec:UI and Spec:distributed. I > would suggest keeping the literature on mocking, with minor > modifications. The tight integration with mocking, and the pushing > the ideas in the literature is what got my team and I to use it. The > current Rails literature really only shows mocks as a way to mock out > an external project, but I think it is good to use it to isolate > tests as well. I think that is proper BDD, too. > > JIm > >> >> _______________________________________________ >> rspec-devel mailing list >> rspec-devel@... >> http://rubyforge.org/mailman/listinfo/rspec-devel > > _______________________________________________ > rspec-devel mailing list > rspec-devel@... > http://rubyforge.org/mailman/listinfo/rspec-devel _______________________________________________ rspec-devel mailing list rspec-devel@... http://rubyforge.org/mailman/listinfo/rspec-devel |
|
|
Re: mock frameworkOn 8/22/07, Carl Porth <badcarl@...> wrote:
> +1, but what framework will rspec's generators use? Should there be > a translator? and what framework should the translator translate to? > A translator from what to what? The RSpec mock framework will still exist, it's just being factored out. > Carl > > > On Aug 22, 2007, at 8:40 AM, Jim Deville wrote: > > > > > On Aug 22, 2007, at 8:20 AM, Jay Levitt wrote: > > > >> David Chelimsky wrote: > >>> I'd like to ditch rspec's mock framework and let ppl use mocha or > >>> flexmock or RR (or others). RSpec's mocking framework doesn't really > >>> offer anything above those frameworks, and it's therefore an > >>> unnecessary burden to maintain. > >> +1! I currently use rspec's mocks because they're the default, but > >> I'd > >> have no problems switching frameworks. If there's no good reason to > >> have our own, let's not have our own. > >> > >> Jay > >> > > > > +1, and +1 to moving things like Spec:UI and Spec:distributed. I > > would suggest keeping the literature on mocking, with minor > > modifications. The tight integration with mocking, and the pushing > > the ideas in the literature is what got my team and I to use it. The > > current Rails literature really only shows mocks as a way to mock out > > an external project, but I think it is good to use it to isolate > > tests as well. I think that is proper BDD, too. > > > > JIm > > > >> > >> _______________________________________________ > >> rspec-devel mailing list > >> rspec-devel@... > >> http://rubyforge.org/mailman/listinfo/rspec-devel > > > > _______________________________________________ > > rspec-devel mailing list > > rspec-devel@... > > http://rubyforge.org/mailman/listinfo/rspec-devel > > _______________________________________________ > rspec-devel mailing list > rspec-devel@... > http://rubyforge.org/mailman/listinfo/rspec-devel > rspec-devel mailing list rspec-devel@... http://rubyforge.org/mailman/listinfo/rspec-devel |
|
|
Re: mock frameworkaslak hellesoy wrote:
> On 8/22/07, Carl Porth <badcarl@...> wrote: >> +1, but what framework will rspec's generators use? Should there be >> a translator? and what framework should the translator translate to? >> > > A translator from what to what? The RSpec mock framework will still > exist, it's just being factored out. But then RSpec and its example specs will be using an unmaintained mock framework that we don't recommend anyone else use? Jay _______________________________________________ rspec-devel mailing list rspec-devel@... http://rubyforge.org/mailman/listinfo/rspec-devel |
|
|
Re: mock frameworkOh I see. I thought since the current mocking framework wouldn't be
maintained there would be a desire for developers to start using a new mocking framework. And since David said that "people would be encouraged to start using other frameworks", I thought that it might be viable to have some sort of translator for the old mocking system to the once of your choice. However, there may not be a need. On another note: David expressed the desire to not prefer any one mocking framework over another. However, rspec has to pick a mocking framework for default configuration, generators, and documentation/ examples. Or does it? Carl On Aug 22, 2007, at 11:00 AM, aslak hellesoy wrote: > On 8/22/07, Carl Porth <badcarl@...> wrote: >> +1, but what framework will rspec's generators use? Should there be >> a translator? and what framework should the translator translate to? >> > > A translator from what to what? The RSpec mock framework will still > exist, it's just being factored out. > >> Carl >> >> >> On Aug 22, 2007, at 8:40 AM, Jim Deville wrote: >> >>> >>> On Aug 22, 2007, at 8:20 AM, Jay Levitt wrote: >>> >>>> David Chelimsky wrote: >>>>> I'd like to ditch rspec's mock framework and let ppl use mocha or >>>>> flexmock or RR (or others). RSpec's mocking framework doesn't >>>>> really >>>>> offer anything above those frameworks, and it's therefore an >>>>> unnecessary burden to maintain. >>>> +1! I currently use rspec's mocks because they're the default, but >>>> I'd >>>> have no problems switching frameworks. If there's no good >>>> reason to >>>> have our own, let's not have our own. >>>> >>>> Jay >>>> >>> >>> +1, and +1 to moving things like Spec:UI and Spec:distributed. I >>> would suggest keeping the literature on mocking, with minor >>> modifications. The tight integration with mocking, and the pushing >>> the ideas in the literature is what got my team and I to use it. >>> The >>> current Rails literature really only shows mocks as a way to mock >>> out >>> an external project, but I think it is good to use it to isolate >>> tests as well. I think that is proper BDD, too. >>> >>> JIm >>> >>>> >>>> _______________________________________________ >>>> rspec-devel mailing list >>>> rspec-devel@... >>>> http://rubyforge.org/mailman/listinfo/rspec-devel >>> >>> _______________________________________________ >>> rspec-devel mailing list >>> rspec-devel@... >>> http://rubyforge.org/mailman/listinfo/rspec-devel >> >> _______________________________________________ >> rspec-devel mailing list >> rspec-devel@... >> http://rubyforge.org/mailman/listinfo/rspec-devel >> > _______________________________________________ > rspec-devel mailing list > rspec-devel@... > http://rubyforge.org/mailman/listinfo/rspec-devel _______________________________________________ rspec-devel mailing list rspec-devel@... http://rubyforge.org/mailman/listinfo/rspec-devel |
|
|
Re: mock frameworkOn 8/22/07, Jay Levitt <lists-rspec@...> wrote:
> aslak hellesoy wrote: > > On 8/22/07, Carl Porth <badcarl@...> wrote: > >> +1, but what framework will rspec's generators use? Should there be > >> a translator? and what framework should the translator translate to? > >> > > > > A translator from what to what? The RSpec mock framework will still > > exist, it's just being factored out. > > But then RSpec and its example specs will be using an unmaintained mock > framework that we don't recommend anyone else use? > Perhaps, but I don't see a compelling reason to migrate RSpec's own specs to use a new mocking framework (yet). We have a framework that works quite nicely for our needs. Unmaintained code doesn't stop working, it just stops to evolve. Aslak > Jay > > _______________________________________________ > rspec-devel mailing list > rspec-devel@... > http://rubyforge.org/mailman/listinfo/rspec-devel > _______________________________________________ rspec-devel mailing list rspec-devel@... http://rubyforge.org/mailman/listinfo/rspec-devel |
|
|
Re: mock frameworkOn 8/22/07, aslak hellesoy <aslak.hellesoy@...> wrote:
> On 8/22/07, Jay Levitt <lists-rspec@...> wrote: > > aslak hellesoy wrote: > > > On 8/22/07, Carl Porth <badcarl@...> wrote: > > >> +1, but what framework will rspec's generators use? Should there be > > >> a translator? and what framework should the translator translate to? > > >> > > > > > > A translator from what to what? The RSpec mock framework will still > > > exist, it's just being factored out. > > > > But then RSpec and its example specs will be using an unmaintained mock > > framework that we don't recommend anyone else use? > > > > Perhaps, but I don't see a compelling reason to migrate RSpec's own > specs to use a new mocking framework (yet). We have a framework that > works quite nicely for our needs. > > Unmaintained code doesn't stop working, it just stops to evolve. One way this could work would be to modify the generators to use a mock_adapter based on rspec's current mocking framework. Then we'd have a model that could be followed for the other frameworks. In the long run, I do want rspec mocks to fade away, not just to remain un-evolving. But there is no urgency for this. David > > Aslak > > > Jay > > > > _______________________________________________ > > rspec-devel mailing list > > rspec-devel@... > > http://rubyforge.org/mailman/listinfo/rspec-devel > > > _______________________________________________ > rspec-devel mailing list > rspec-devel@... > http://rubyforge.org/mailman/listinfo/rspec-devel > rspec-devel mailing list rspec-devel@... http://rubyforge.org/mailman/listinfo/rspec-devel |
|
|
Re: mock framework
One potential issue is the one-mocking-framework-per-run constraint. In
other words, any future development of rspec would have to continue to
use the rspec mocking framework because we couldn't suddenly start
using mocha mocks (say) in new examples.
This isn't a big deal for now, but it would be if we started wanting to mock things that rspec's built-in mocking framework couldn't handle. However it pans out, we will be implicitly "preferring" whichever framework rspec itself uses for describing its own behaviour. Of course this would become moot if we could choose a mocking framework per describe block (maybe using a stack that gets popped at the end of the describe block). Cheers, Dan ps. +1 for leveraging other mocking frameworks - the less there is in the core, the better we can focus on the important stuff. pps. +lots for keeping the (excellent) documentation about mocking in the core rspec docs. Mocking is a fundamental aspect of BDD. David Chelimsky wrote: On 8/22/07, aslak hellesoy aslak.hellesoy@... wrote:On 8/22/07, Jay Levitt lists-rspec@... wrote: _______________________________________________ rspec-devel mailing list rspec-devel@... http://rubyforge.org/mailman/listinfo/rspec-devel |
|
|
Re: mock frameworkOn Aug 22, 2007, at 3:26 PM, Dan North wrote: > One potential issue is the one-mocking-framework-per-run > constraint. In other words, any future development of rspec would > have to continue to use the rspec mocking framework because we > couldn't suddenly start using mocha mocks (say) in new examples. > > This isn't a big deal for now, but it would be if we started > wanting to mock things that rspec's built-in mocking framework > couldn't handle. > > However it pans out, we will be implicitly "preferring" whichever > framework rspec itself uses for describing its own behaviour. Of > course this would become moot if we could choose a mocking > framework per describe block (maybe using a stack that gets popped > at the end of the describe block). I believe it's a good option to factor out the mocking framework. Why couldn't it just be a dependency on the rspec gem, and use it as the default, as it is now? If one wants to use another mocking framework, they can - that is the state of things right now (AFAIK). But I think the docs should be clear about this - that doing bdd w/ out mocks & stubs shouldn't be an option. As for using multiple mock frameworks on one project - is that currently an option? Couldn't different spec_helper.rb files be included for different mocking frameworks? Scott _______________________________________________ rspec-devel mailing list rspec-devel@... http://rubyforge.org/mailman/listinfo/rspec-devel |
|
|
Re: mock frameworkOn 8/22/07, Scott Taylor <mailing_lists@...> wrote:
> > On Aug 22, 2007, at 3:26 PM, Dan North wrote: > > > One potential issue is the one-mocking-framework-per-run > > constraint. In other words, any future development of rspec would > > have to continue to use the rspec mocking framework because we > > couldn't suddenly start using mocha mocks (say) in new examples. > > > > This isn't a big deal for now, but it would be if we started > > wanting to mock things that rspec's built-in mocking framework > > couldn't handle. > > > > However it pans out, we will be implicitly "preferring" whichever > > framework rspec itself uses for describing its own behaviour. Of > > course this would become moot if we could choose a mocking > > framework per describe block (maybe using a stack that gets popped > > at the end of the describe block). > > I believe it's a good option to factor out the mocking framework. > Why couldn't it just be a dependency on the rspec gem, and use it as > the default, as it is now? If one wants to use another mocking > framework, they can - that is the state of things right now (AFAIK). > > But I think the docs should be clear about this - that doing bdd w/ > out mocks & stubs shouldn't be an option. > > As for using multiple mock frameworks on one project - is that > currently an option? Couldn't different spec_helper.rb files be > included for different mocking frameworks? The problem w/ mixing mocking frameworks is that some of them (namely rspec and mocha) add methods to Object, and they use similar methods (like mock()) to create mocks. So you can only safely have one mock framework PER PROCESS, not per file. > > Scott > > _______________________________________________ > rspec-devel mailing list > rspec-devel@... > http://rubyforge.org/mailman/listinfo/rspec-devel > _______________________________________________ rspec-devel mailing list rspec-devel@... http://rubyforge.org/mailman/listinfo/rspec-devel |
|
|
|
|
|
Re: mock framework
David Chelimsky wrote:
I would suggest that you only want one mocking framework per project anyway, for the sake of sanity. Surely that comes under common coding conventions?!On 8/22/07, Scott Taylor mailing_lists@... wrote: Cheers, Dan _______________________________________________ rspec-devel mailing list rspec-devel@... http://rubyforge.org/mailman/listinfo/rspec-devel |
|
|
Re: mock frameworkOn 8/22/2007 7:30 PM, Ian Dees wrote:
> Quoth David: > >> The problem w/ mixing mocking frameworks is that some of them (namely >> rspec and mocha) add methods to Object, and they use similar methods >> (like mock()) to create mocks. So you can only safely have one mock >> framework PER PROCESS, not per file. > > Is the FreakyFreaky Sandbox usable/stable enough to deal with this possibility? > > http://code.whytheluckystiff.net/sandbox Looks like, until 1.9, that needs a patch to Ruby. :( Jay _______________________________________________ rspec-devel mailing list rspec-devel@... http://rubyforge.org/mailman/listinfo/rspec-devel |
| < Prev | 1 - 2 | Next > |
| Free embeddable forum powered by Nabble | Forum Help |