features/rails.feature in airbrake-3.1.10 vs features/rails.feature in airbrake-3.1.11
- old
+ new
@@ -4,11 +4,11 @@
Given I successfully run `rails new rails_root -O --skip-gemfile`
And I cd to "rails_root"
Scenario: Use the gem without vendoring the gem in a Rails application
When I configure the Airbrake shim
- And I run `rails generate airbrake -k myapikey`
+ And I run `rails generate airbrake -k myapikey -t`
Then I should receive a Airbrake notification
And I should see the Rails version
Scenario: Configure the notifier by hand
When I configure the Airbrake shim
@@ -16,19 +16,18 @@
And I run `rails generate airbrake`
Then I should receive a Airbrake notification
Scenario: Configuration within initializer isn't overridden by Railtie
When I configure the Airbrake shim
- And I run `rails generate airbrake -k myapikey`
+ And I run `rails generate airbrake -k myapikey -t`
And I configure the notifier to use the following configuration lines:
"""
config.api_key = "myapikey"
config.project_root = "argle/bargle"
"""
And I define a response for "TestController#index":
"""
- session[:value] = "test"
raise RuntimeError, "some message"
"""
And I route "/test/index" to "test#index"
And I perform a request to "http://example.com:123/test/index?param=value"
Then I should receive a Airbrake notification
@@ -45,11 +44,11 @@
"""
Scenario: Configure and deploy using only installed gem
When I run `capify .`
And I configure the Airbrake shim
- And I run `rails generate airbrake -k myapikey`
+ And I run `rails generate airbrake -k myapikey -t`
And I run `cap -T`
Then I should see "airbrake:deploy"
Scenario: Try to install when the airbrake plugin still exists
When I install the "airbrake" plugin
@@ -58,24 +57,22 @@
And I run `rails generate airbrake`
Then I should see "You must first remove the airbrake plugin. Please run: script/plugin remove airbrake"
Scenario: Rescue an exception in a controller
When I configure the Airbrake shim
- And I run `rails generate airbrake -k myapikey`
+ And I run `rails generate airbrake -k myapikey -t`
And I define a response for "TestController#index":
"""
- session[:value] = "test"
raise RuntimeError, "some message"
"""
And I route "/test/index" to "test#index"
And I perform a request to "http://example.com:123/test/index?param=value"
Then I should receive a Airbrake notification
- Then I should see "test"
Scenario: The gem should not be considered a framework gem
When I configure the Airbrake shim
- And I run `rails generate airbrake -k myapikey`
+ And I run `rails generate airbrake -k myapikey -t`
And I run `rake gems`
Then I should see that "airbrake" is not considered a framework gem
Scenario: The app uses Vlad instead of Capistrano
When I configure the Airbrake shim
@@ -85,11 +82,11 @@
Then "config/deploy.rb" should not contain "capistrano"
@wip
Scenario: Support the Heroku addon in the generator
When I configure the Airbrake shim
- And I run `rails generate airbrake -k myapikey`
+ And I run `rails generate airbrake -k myapikey -t`
And I configure the Heroku shim with "myapikey"
And I successfully run `rails generate airbrake --heroku`
Then I should receive a Airbrake notification
And I should see the Rails version
And my Airbrake configuration should contain the following line:
@@ -99,21 +96,21 @@
@wip
Scenario: Support the --app option for the Heroku addon in the generator
When I configure the Airbrake shim
And I configure the Heroku shim with "myapikey" and multiple app support
- And I run `rails generate airbrake --heroku -a myapp`
+ And I run `rails generate airbrake --heroku -a myapp -t`
Then I should receive a Airbrake notification
And I should see the Rails version
And my Airbrake configuration should contain the following line:
"""
config.api_key = ENV['HOPTOAD_API_KEY']
"""
Scenario: Filtering parameters in a controller
When I configure the Airbrake shim
- And I run `rails generate airbrake -k myapikey`
+ And I run `rails generate airbrake -k myapikey -t`
When I configure the notifier to use the following configuration lines:
"""
config.api_key = "myapikey"
config.params_filters << "credit_card_number"
config.params_filters << "secret"
@@ -126,17 +123,17 @@
raise RuntimeError, "some message"
"""
And I route "/test/index" to "test#index"
And I perform a request to "http://example.com:123/test/index?param=value" in the "production" environment
Then I should receive a Airbrake notification
- Then I should not see "red23"
- Then I should not see "blue42"
- And I should see "FILTERED"
+ And the Airbrake notification should not contain "red23"
+ And the Airbrake notification should not contain "blue42"
+ And the Airbrake notification should contain "FILTERED"
Scenario: Filtering session and params based on Rails parameter filters
When I configure the Airbrake shim
- And I run `rails generate airbrake -k myapikey`
+ And I run `rails generate airbrake -k myapikey -t`
When I configure the notifier to use the following configuration lines:
"""
config.logger = Logger.new STDOUT
"""
And I configure the application to filter parameter "secret"
@@ -147,27 +144,27 @@
raise RuntimeError, "some message"
"""
And I route "/test/index" to "test#index"
And I perform a request to "http://example.com:123/test/index" in the "production" environment
Then I should receive a Airbrake notification
- And I should not see "red23"
- And I should not see "blue42"
- And I should see "FILTERED"
+ And the Airbrake notification should not contain "red23"
+ And the Airbrake notification should not contain "blue42"
+ And the Airbrake notification should contain "FILTERED"
Scenario: Notify airbrake within the controller
When I configure the Airbrake shim
- And I run `rails generate airbrake -k myapikey`
+ And I run `rails generate airbrake -k myapikey -t`
And I define a response for "TestController#index":
"""
- session[:value] = "test"
+ session[:value] = "unicorn"
notify_airbrake(RuntimeError.new("some message"))
render :nothing => true
"""
And I route "/test/index" to "test#index"
And I perform a request to "http://example.com:123/test/index?param=value" in the "production" environment
Then I should receive a Airbrake notification
- And I should see "test"
+ And the Airbrake notification should contain "unicorn"
Scenario: Reporting 404s should be disabled by default
When I configure the Airbrake shim
And I configure the notifier to use the following configuration lines:
"""
@@ -177,11 +174,11 @@
Then I should see "The page you were looking for doesn't exist."
And I should not receive a Airbrake notification
Scenario: Reporting 404s should work when configured properly
When I configure the Airbrake shim
- And I run `rails generate airbrake -k myapikey`
+ And I run `rails generate airbrake -k myapikey -t`
When I configure the notifier to use the following configuration lines:
"""
config.ignore_only = []
"""
And I perform a request to "http://example.com:123/this/route/does/not/exist" in the "production" environment
@@ -189,10 +186,10 @@
And I should receive a Airbrake notification
@wip
Scenario: reporting over SSL with utf8 check should work
When I configure the Airbrake shim
- And I run `rails generate airbrake -k myapikey`
+ And I run `rails generate airbrake -k myapikey -t`
When I configure the notifier to use the following configuration lines:
"""
config.secure = true
"""
And I define a response for "TestController#index":