Skip to content
Snippets Groups Projects
Commit 14daf2e2 authored by Robert Speicher's avatar Robert Speicher
Browse files

Add `include_module` matcher

parent 2c95074a
No related branches found
No related tags found
1 merge request!1333Increased model spec coverage
Loading
Loading
@@ -28,6 +28,16 @@ RSpec::Matchers.define :be_404_for do |user|
end
end
 
RSpec::Matchers.define :include_module do |expected|
match do
described_class.included_modules.include?(expected)
end
failure_message_for_should do
"expected #{described_class} to include the #{expected} module"
end
end
module UrlAccess
def url_allowed?(user, url)
emulate_user(user)
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment