Sha256: 7f9e7e5c27be32ef2cf0ce7f47ed310bd4773efe71d57acc47431195924571ca
Contents?: true
Size: 1.53 KB
Versions: 2
Compression:
Stored size: 1.53 KB
Contents
Feature: Use the notifier in a plain Rack app Background: Given I have built and installed the "projectlocker-pulse" gem Scenario: Rescue and exception in a Rack app Given the following Rack app: """ require 'logger' require 'rack' require 'projectlocker_pulse' Pulse.configure do |config| config.api_key = 'my_api_key' config.logger = Logger.new STDOUT end app = Rack::Builder.app do use Pulse::Rack run lambda { |env| raise "Rack down" } end """ When I perform a Rack request to "http://example.com:123/test/index?param=value" Then I should receive a Pulse notification Scenario: Ignore user agents Given the following Rack app: """ require 'logger' require 'rack' require 'projectlocker_pulse' Pulse.configure do |config| config.api_key = 'my_api_key' config.ignore_user_agent << /ignore/ config.logger = Logger.new STDOUT end class Mock class AppendUserAgent def initialize(app) @app = app end def call(env) env["HTTP_USER_AGENT"] = "ignore" @app.call(env) end end end app = Rack::Builder.app do use Pulse::Rack use Mock::AppendUserAgent run lambda { |env| raise "Rack down" } end """ When I perform a Rack request to "http://example.com:123/test/index?param=value" Then I should not see "** [Pulse] Response from Pulse:"
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
projectlocker_pulse-1.0.0 | features/rack.feature |
projectlocker_pulse-0.2.1 | features/rack.feature |