Skip to content

It would be nice to have something like controller.should use_before_filter(:filter_name).for(:show)... #106

@fidothe

Description

@fidothe

... to enable declarative assertions about whether filters should fire for a given action. I use this a lot in conjunction with shared guard filters where I don't want to have to do the setup for every controller test so I assert that the filter will be used and then stub it out... My implementation is at http://github.com/fidothe/shoulda/tree/use_filter, in lib/shoulda/action_controller/matchers/use_filter_matcher, tests in test/matchers/controller/use_filter_matcher_test.rb.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions