Feature: Inform the user of the projectlocker_errata notice that was just created Background: Given I have built and installed the "projectlocker_errata" gem Scenario: Rescue an exception in a controller When I generate a new Rails application And I configure the ProjectlockerErrata shim And I configure my application to require the "projectlocker_errata" gem And I run the projectlocker_errata generator with "-k myapikey" And I define a response for "TestController#index": """ raise RuntimeError, "some message" """ And the response page for a "500" error is """ """ 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 see "ProjectlockerErrata Error b6817316-9c45-ed26-45eb-780dbb86aadb" Scenario: Rescue an exception in a controller with a custom error string When I generate a new Rails application And I configure the ProjectlockerErrata shim And I configure my application to require the "projectlocker_errata" gem And I configure the notifier to use the following configuration lines: """ config.user_information = 'Error #{{ error_id }}' """ And I run the projectlocker_errata generator with "-k myapikey" And I define a response for "TestController#index": """ raise RuntimeError, "some message" """ And the response page for a "500" error is """ """ 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 see "Error #b6817316-9c45-ed26-45eb-780dbb86aadb" Scenario: Don't inform them user When I generate a new Rails application And I configure the ProjectlockerErrata shim And I configure my application to require the "projectlocker_errata" gem And I configure the notifier to use the following configuration lines: """ config.user_information = false """ And I run the projectlocker_errata generator with "-k myapikey" And I define a response for "TestController#index": """ raise RuntimeError, "some message" """ And the response page for a "500" error is """ """ 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 not see "ProjectlockerErrata Error b6817316-9c45-ed26-45eb-780dbb86aadb"