Commit 14daf2e2 authored by Robert Speicher's avatar Robert Speicher

Add `include_module` matcher

parent 2c95074a
...@@ -28,6 +28,16 @@ RSpec::Matchers.define :be_404_for do |user| ...@@ -28,6 +28,16 @@ RSpec::Matchers.define :be_404_for do |user|
end end
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 module UrlAccess
def url_allowed?(user, url) def url_allowed?(user, url)
emulate_user(user) emulate_user(user)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment