Add include_module
matcher
This commit is contained in:
parent
2c95074a5f
commit
14daf2e2ba
1 changed files with 10 additions and 0 deletions
|
@ -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…
Add table
Reference in a new issue