flyerhzm/bullet — pull request #119 by danfinnie (2013-08-28 04:39:36+00:00)
Title: Use the UniformNotifier's raise method so specs will fail on bullet errors

This is the followup to a pull request we just gave against uniform_notifier that essentially just passes the "raise" Bullet config parameter through to UniformNotifier. It also specifies a class so the errors appear to come from Bullet, not UniformNotifier. The end result of these 2 pull requests is that specs fail like this:

We bumped the version of uniform notifier and required the new version here.

@splith

```
4) Widgets GET /widgets works! (now write some real specs)
Failure/Error: get widgets_path
Bullet::Notification::UnoptimizedQueryError:
user: daniel
N+1 Query detected
Part => [:subpart]
Add to your finder: :include => [:subpart]
N+1 Query method call stack
N+1 Query method call stack
N+1 Query method call stack
/home/daniel/code/bullet-raise/the-silver-bullet/app/controllers/widgets_controller.rb:11:in `index'
/home/daniel/code/bullet-raise/the-silver-bullet/spec/requests/widgets_spec.rb:7:in `block (3 levels) in '
# /home/daniel/code/bullet-raise/bullet/lib/bullet/notification/base.rb:43:in `notify_inline'
# /home/daniel/code/bullet-raise/bullet/lib/bullet.rb:112:in `block in gather_inline_notifications'
# /home/daniel/code/bullet-raise/bullet/lib/bullet.rb:149:in `block (2 levels) in for_each_active_notifier_with_notification'
# /home/daniel/code/bullet-raise/bullet/lib/bullet.rb:147:in `block in for_each_active_notifier_with_notification'
# /home/daniel/code/bullet-raise/bullet/lib/bullet.rb:146:in `each'
# /home/daniel/code/bullet-raise/bullet/lib/bullet.rb:146:in `for_each_active_notifier_with_notification'
# /home/daniel/code/bullet-raise/bullet/lib/bullet.rb:111:in `gather_inline_notifications'
# /home/daniel/code/bullet-raise/bullet/lib/bullet/rack.rb:19:in `call'
# ./spec/requests/widgets_spec.rb:7:in `block (3 levels) in '
```