Sha256: 94191d9e23a30a328e1c9b4d69dfff2a9134931977618a778714cb26c06ec136

Contents?: true

Size: 230 Bytes

Versions: 39

Compression:

Stored size: 230 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

39 entries across 39 versions & 1 rubygems

Version Path
table_sortable-1.0.0.pre.alpha.21 spec/support/matchers/have_filters.rb
table_sortable-1.0.0.pre.alpha.20 spec/support/matchers/have_filters.rb
table_sortable-1.0.0.pre.alpha.19 spec/support/matchers/have_filters.rb
table_sortable-1.0.0.pre.alpha.18 spec/support/matchers/have_filters.rb
table_sortable-1.0.0.pre.alpha.17 spec/support/matchers/have_filters.rb
table_sortable-1.0.0.pre.alpha.16 spec/support/matchers/have_filters.rb
table_sortable-1.0.0.pre.alpha.15 spec/support/matchers/have_filters.rb
table_sortable-1.0.0.pre.alpha.14 spec/support/matchers/have_filters.rb
table_sortable-1.0.0.pre.alpha.13 spec/support/matchers/have_filters.rb
table_sortable-1.0.0.pre.alpha.12 spec/support/matchers/have_filters.rb
table_sortable-1.0.0.pre.alpha.11 spec/support/matchers/have_filters.rb
table_sortable-1.0.0.pre.alpha.10 spec/support/matchers/have_filters.rb
table_sortable-1.0.0.pre.alpha.9 spec/support/matchers/have_filters.rb
table_sortable-1.0.0.pre.alpha.8 spec/support/matchers/have_filters.rb
table_sortable-1.0.0.pre.alpha.7 spec/support/matchers/have_filters.rb
table_sortable-1.0.0.pre.alpha.6 spec/support/matchers/have_filters.rb
table_sortable-1.0.0.pre.alpha.5 spec/support/matchers/have_filters.rb
table_sortable-1.0.0.pre.alpha.4 spec/support/matchers/have_filters.rb
table_sortable-1.0.0.pre.alpha.3 spec/support/matchers/have_filters.rb
table_sortable-1.0.0.pre.alpha.2 spec/support/matchers/have_filters.rb