This might be better as a guard like:

```ruby
def trigger_pusher_new_message
  return if Rails.env.test?

  begin
    Pusher[self.account.slug].trigger('new_message', {})
  rescue Pusher::Error => e
    logger.error e.message
  end
end
```