[rspec-users] Slow Focus tags

Rainer Kuhn rainer at incutio.com
Thu Jun 7 12:18:02 UTC 2012


I tried putting the fixtures into a subfolder, next I'm trying to replicate
the behaviour in a blank project. Then you and the rails devs have a bit
more to play with.

On Thu, Jun 7, 2012 at 12:57 PM, David Chelimsky <dchelimsky at gmail.com>wrote:

> On Thu, Jun 7, 2012 at 6:29 AM, Rainer Kuhn <rainer at incutio.com> wrote:
> > Follow up: is there a way to set RSpec to be less forgiving on errors.
> If my
> > specs would have failed because of that error I would have fixed it
> months
> > ago. (Or at least reported it)
>
> I can't duplicate this behavior myself, but from what I can see in the
> gist, it happens when rspec calls Rails `fixtures` method and does not
> bubble back up to RSpec. If you see a place that RSpec is actively
> hiding this please submit an issue to
> http://github.com/rspec/rspec-rails/issues.
>
> Cheers,
> David
>
> >
> >
> > On Thu, Jun 7, 2012 at 12:26 PM, Rainer Kuhn <rainer at incutio.com> wrote:
> >>
> >> I guess I can forward this issue to fixture builder, It only happens for
> >> fixtures that are in a module, like
> >> Event::Confirm
> >> Event::CriticalError
> >> Those fixtures propably need to either be named differently or to live
> in
> >> a module subfolder.
> >>
> >> So, nothing wrong with RSpec, I am very sorry that I put this one on
> you,
> >> so many times you have already proven to people that the error lies
> >> elsewhere and rspec is running perfectly fine. But for many users like
> me
> >> it's where we see the error/problem we suspect it's origin.
> >> And integration between all the testing tools is tricky to balance for
> >> devs.
> >>
> >> On Thu, Jun 7, 2012 at 12:15 PM, David Chelimsky <dchelimsky at gmail.com>
> >> wrote:
> >>>
> >>> On Thu, Jun 7, 2012 at 5:54 AM, David Chelimsky <dchelimsky at gmail.com>
> >>> wrote:
> >>> > On Thu, Jun 7, 2012 at 4:00 AM, Rainer Kuhn <rainer at incutio.com>
> wrote:
> >>> >> I narrowed it down to three things, the first one might be
> interesting
> >>> >> to
> >>> >> you, the other ones are my problem, although probably common among
> >>> >> lots of
> >>> >> projects:
> >>> >>
> >>> >> Since we don't mock we usually need a bit of test data prepared for
> >>> >> each
> >>> >> test. At first we used factories, but setting things up every time
> >>> >> took way
> >>> >> to long. So I went for fixture builder instead.
> >>> >>
> >>> >> (
> http://pivotallabs.com/users/georg/blog/articles/1864-fixture-builder-and-rspec-acceptance
> )
> >>> >> It was an immediate improvement, although not a great one, since we
> >>> >> have a
> >>> >> generic setup_test_data method that runs before most tests and loads
> >>> >> from
> >>> >> the database into instance variables.
> >>> >>
> >>> >> 1) config.global_fixtures = :all
> >>> >> With this line in, the execution of a single focused spec jumps up
> to
> >>> >> a
> >>> >> minute. My unresearched guess is that it might load the fixtures for
> >>> >> each
> >>> >> spec, although it won't even be executed.
> >>> >
> >>> > Would you please check log/test.log to verify this?
> >>>
> >>> Actually I went ahead and checked this myself and what I see is that
> >>> it only creates fixtures before each spec that is run. If you run one,
> >>> it happens once ... 2, twice, etc.
> >>> _______________________________________________
> >>> rspec-users mailing list
> >>> rspec-users at rubyforge.org
> >>> http://rubyforge.org/mailman/listinfo/rspec-users
> >>
> >>
> >>
> >>
> >> --
> >> Rainer Kuhn
> >>
> >> Rails Developer
> >> Incutio :: www.incutio.com
> >> http://www.facebook.com/Incutio
> >> https://twitter.com/incutio
> >>
> >> UK Head Office: Unit 4, The Bridge Business Centre, Ash Road South,
> >> Wrexham, LL13 9UG.
> >>
> >> US Head Office: 33 South Commercial Street, Manchester, NH 03101
> >>
> >> T: +44 (0) 1978 661 666
> >> F: +44 (0)7092 181 581
> >>
> >
> >
> >
> > --
> > Rainer Kuhn
> >
> > Rails Developer
> > Incutio :: www.incutio.com
> > http://www.facebook.com/Incutio
> > https://twitter.com/incutio
> >
> > UK Head Office: Unit 4, The Bridge Business Centre, Ash Road South,
> Wrexham,
> > LL13 9UG.
> >
> > US Head Office: 33 South Commercial Street, Manchester, NH 03101
> >
> > T: +44 (0) 1978 661 666
> > F: +44 (0)7092 181 581
> >
> >
> > _______________________________________________
> > rspec-users mailing list
> > rspec-users at rubyforge.org
> > http://rubyforge.org/mailman/listinfo/rspec-users
> _______________________________________________
> rspec-users mailing list
> rspec-users at rubyforge.org
> http://rubyforge.org/mailman/listinfo/rspec-users
>



-- 
Rainer Kuhn

Rails Developer
Incutio :: www.incutio.com
http://www.facebook.com/Incutio
https://twitter.com/incutio

UK Head Office: Unit 4, The Bridge Business Centre, Ash Road South,
Wrexham, LL13 9UG.

US Head Office: 33 South Commercial Street, Manchester, NH 03101

T: +44 (0) 1978 661 666
F: +44 (0)7092 181 581
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://rubyforge.org/pipermail/rspec-users/attachments/20120607/ed1eb0c8/attachment-0001.html>


More information about the rspec-users mailing list