Sha256: db3a81e2dd5a71e576f6583ad9db8a05d00ec43005216b6c0887ec0272dc8726

Contents?: true

Size: 231 Bytes

Versions: 6

Compression:

Stored size: 231 Bytes

Contents

RSpec::Matchers.define :have_filters do |kind, *names|
  match do |controller|
    filters = controller._process_action_callbacks.select{ |f| f.kind == kind }.map(&:filter)
    names.all?{ |name| filters.include?(name) }
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
thunderer-1.1.3 spec/support/matchers/have_filter.rb
thunderer-1.1.1 spec/support/matchers/have_filter.rb
thunderer-1.1.0 spec/support/matchers/have_filter.rb
thunderer-1.0.0 spec/support/matchers/have_filter.rb
thunderer-0.9.1 spec/support/matchers/have_filter.rb
thunderer-0.9.0 spec/support/matchers/have_filter.rb