Skip to content

Commit

Permalink
Fix server issues with tests.
Browse files Browse the repository at this point in the history
  • Loading branch information
tristandunn committed Feb 13, 2016
1 parent 5e493ee commit 8fc77c8
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
4 changes: 4 additions & 0 deletions lib/pusher-fake/configuration.rb
Expand Up @@ -30,6 +30,10 @@ class Configuration

# Instantiated from {PusherFake.configuration}. Sets the defaults.
def initialize
reset!
end

def reset!
self.app_id = "PUSHER_APP_ID"
self.key = "PUSHER_API_KEY"
self.logger = STDOUT.to_io
Expand Down
3 changes: 3 additions & 0 deletions spec/support/pusher-fake.rb
@@ -1,5 +1,8 @@
require "thin/server"

RSpec.configure do |config|
config.before(:each, type: :feature) do
PusherFake.configuration.reset!
PusherFake.configuration.web_options.tap do |options|
Pusher.url = "http://PUSHER_API_KEY:PUSHER_API_SECRET@#{options[:host]}:#{options[:port]}/apps/PUSHER_APP_ID"
end
Expand Down

0 comments on commit 8fc77c8

Please sign in to comment.