features/rails.feature in airbrake-3.1.8 vs features/rails.feature in airbrake-3.1.9
- old
+ new
@@ -32,13 +32,20 @@
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
Scenario: Try to install without an api key
- And I run `rails generate airbrake`
+ When I run `rails generate airbrake`
Then I should see "Must pass --api-key or --heroku or create config/initializers/airbrake.rb"
+ Scenario: Generator should support the --secure option
+ When I run `rails generate airbrake -k myapikey --secure`
+ Then my Airbrake configuration should contain the following line:
+ """
+ config.secure = true
+ """
+
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 `cap -T`
@@ -215,9 +222,27 @@
And the Airbrake notification should contain user details
When I have set up authentication system in my app that uses "current_member"
And I perform a request to "http://example.com:123/test/index" in the "production" environment
Then I should receive a Airbrake notification
And the Airbrake notification should contain user details
+
+ Scenario: It should also send custom user attributes
+ When I configure the Airbrake shim
+ And I configure the notifier to use the following configuration lines:
+ """
+ config.api_key = "myapikey"
+ config.logger = Logger.new STDOUT
+ config.user_attributes = [:id, :name, :email, :username, :class_name]
+ """
+ And I define a response for "TestController#index":
+ """
+ raise RuntimeError, "some message"
+ """
+ And I route "/test/index" to "test#index"
+ And I have set up authentication system in my app that uses "current_user"
+ And I perform a request to "http://example.com:123/test/index" in the "production" environment
+ Then I should receive a Airbrake notification
+ And the Airbrake notification should contain the custom user details
Scenario: It should log the notice when failure happens
When Airbrake server is not responding
And I configure the notifier to use the following configuration lines:
"""