docbrown/spec/support/within_block_is_expected.rb
Mac Siri ff36271108 Improve ArticlesController's authorization (#466)
* Fix lint

* Add pundit-matchers gem

* Strengthen ArticlePolicy & create spec

* Change ApplicationPolicy to a closed system

* Globally handle pundit's NotAuthorizedError

* Fix lint

* Adjust /new's authorization
2018-06-21 14:18:32 -04:00

9 lines
165 B
Ruby

module WithinBlockIsExpected
def within_block_is_expected
expect { subject }
end
end
RSpec.configure do |config|
config.include WithinBlockIsExpected
end