I've used Bullet briefly many moons ago but haven't used it for assertion. 
However, looking at Bullet's source, I think you might be able to wrap its 
`NPlusOneQuery` class for assertion? 
https://github.com/flyerhzm/bullet/blob/master/spec/bullet/detector/n_plus_one_query_spec.rb

On Monday, 3 September 2012 20:56:36 UTC+10, Paul Annesley wrote:
>
> Bullet does look cool, but as far as I know it doesn't provide assertions 
> like I'm after. 
>
> The post I read was specifically about writing RSpec (or Test::Unit?) 
> assertions based on number of queries. 
>
> The QuerySpy I ended up with works well for me. 
>
> — Paul 
>
>
> On 03/09/2012, at 12:48 PM, Craig Read <[email protected] <javascript:>> 
> wrote: 
>
> > I don't remember seeing a post on this, but do remember watching the 
> Railscast on Bullet recently. 
> > http://railscasts.com/episodes/372-bullet 
> > 
> > On Mon, Sep 3, 2012 at 12:34 PM, Paul Annesley <[email protected]> wrote: 
> > I recently read a post about writing tests to catch n+1 query 
> regressions, but I have no idea where it was. 
> > 
> > I'm not sure it's a good idea (or possible to do in a non-fragile way), 
> but it would be useful at this phase of an app I'm working on. 
> > 
> > Does anybody remember the post, or have any thoughts on the matter? 
> > 
> > — Paul 
> > 
>
>

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
or Rails Oceania" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/rails-oceania/-/0WSa5uRGIpMJ.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/rails-oceania?hl=en.

Reply via email to