[rspec-users] Can I run the same specs with different gems? Ideas?

David Chelimsky dchelimsky at gmail.com
Sat May 16 11:57:32 EDT 2009

On Fri, May 15, 2009 at 11:50 AM, Rick DeNatale <rick.denatale at gmail.com> wrote:
> I have a new icalendar Ruby library/gem which is implemented so as
> require an implementation of the TZInfo::Timezone class, but not to
> care whether that implementation comes from the tzinfo gem, or the
> activesupport gem in rails.  It also will make use of the TimeWithZone
> class in recent versions of activesupport if it's loaded, but it
> leaves the decision of whether to load the activesuport or tzinfo gems
> up to the user.
> Now, it that makes sense I'd like to be able to run my specs with the
> tzinfo gen and then with the activesupport gem.  Ideally I'd like to
> have rake tasks like
> rake spec:tzinfo
> rake spec:activesupport
> rake spec:both
> The problem is that I think I need something like the fork option for
> spec task similar to the one in the cucumber task, since once loaded I
> can't unload one or the other gem in the same ruby process.
> Is there a trick I'm missing?

Sounds like a missing feature, actually. RSpec's own suite has a
forker, which I'm pretty sure that Aslak wrote and is likely the
source of the cucumber option you're talking about, but it is not
exposed as an API, yet. I think it should be. Wanna patch it?

> --
> Rick DeNatale
> Blog: http://talklikeaduck.denhaven2.com/
> Twitter: http://twitter.com/RickDeNatale
> WWR: http://www.workingwithrails.com/person/9021-rick-denatale
> LinkedIn: http://www.linkedin.com/in/rickdenatale
> _______________________________________________
> rspec-users mailing list
> rspec-users at rubyforge.org
> http://rubyforge.org/mailman/listinfo/rspec-users

More information about the rspec-users mailing list