Sha256: 81994b4fb6bb6d1e33da4a33d9d4d4e226e97243bfd6e12e2c5b98162dfda14c

Contents?: true

Size: 429 Bytes

Versions: 17

Compression:

Stored size: 429 Bytes

Contents

# frozen_string_literal: true

shared_examples "fires an ActiveSupport::Notification event" do |fired_event|
  it "subscribes to #{fired_event}" do
    @tested_notification = false
    subscriber = ActiveSupport::Notifications.subscribe(fired_event) { |_, _| @tested_notification = true }

    command.call

    expect(@tested_notification).to eq(true)
  ensure
    ActiveSupport::Notifications.unsubscribe(subscriber)
  end
end

Version data entries

17 entries across 17 versions & 1 rubygems

Version Path
decidim-core-0.30.0.rc2 lib/decidim/core/test/shared_examples/active_support_examples.rb
decidim-core-0.30.0.rc1 lib/decidim/core/test/shared_examples/active_support_examples.rb
decidim-core-0.29.2 lib/decidim/core/test/shared_examples/active_support_examples.rb
decidim-core-0.28.5 lib/decidim/core/test/shared_examples/active_support_examples.rb
decidim-core-0.29.1 lib/decidim/core/test/shared_examples/active_support_examples.rb
decidim-core-0.28.4 lib/decidim/core/test/shared_examples/active_support_examples.rb
decidim-core-0.29.0 lib/decidim/core/test/shared_examples/active_support_examples.rb
decidim-core-0.28.3 lib/decidim/core/test/shared_examples/active_support_examples.rb
decidim-core-0.29.0.rc4 lib/decidim/core/test/shared_examples/active_support_examples.rb
decidim-core-0.29.0.rc3 lib/decidim/core/test/shared_examples/active_support_examples.rb
decidim-core-0.29.0.rc2 lib/decidim/core/test/shared_examples/active_support_examples.rb
decidim-core-0.29.0.rc1 lib/decidim/core/test/shared_examples/active_support_examples.rb
decidim-core-0.28.2 lib/decidim/core/test/shared_examples/active_support_examples.rb
decidim-core-0.28.1 lib/decidim/core/test/shared_examples/active_support_examples.rb
decidim-core-0.28.0 lib/decidim/core/test/shared_examples/active_support_examples.rb
decidim-core-0.28.0.rc5 lib/decidim/core/test/shared_examples/active_support_examples.rb
decidim-core-0.28.0.rc4 lib/decidim/core/test/shared_examples/active_support_examples.rb