Sha256: 7b2767275c61ab4d1b710482f07b508d6be77c44cf01ea5f10290a20d9405e20

Contents?: true

Size: 358 Bytes

Versions: 4

Compression:

Stored size: 358 Bytes

Contents

module NotificationCenter
  module RspecHelpers
    Rspec.configure do |config|
      config.around(:each) do |spec|
        NotificationCenter.enable_notifications = false if spec.metadata[:notifications] == false
        spec.call
        NotificationCenter.enable_notifications = true if spec.metadata[:notifications] == false
      end
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
notification_center-0.3.2 lib/notification_center/rspec_helpers.rb
notification_center-0.3.1 lib/notification_center/rspec_helpers.rb
notification_center-0.3 lib/notification_center/rspec_helpers.rb
notification_center-0.2 lib/notification_center/rspec_helpers.rb