gitlab-org--gitlab-foss/spec/support/matchers/include_module.rb

16 lines
319 B
Ruby
Raw Normal View History

# frozen_string_literal: true
2012-08-29 01:49:26 -04:00
RSpec::Matchers.define :include_module do |expected|
match do
described_class.included_modules.include?(expected)
end
2015-03-27 22:49:57 -04:00
description do
2015-05-23 17:32:39 -04:00
"includes the #{expected} module"
2015-03-27 22:49:57 -04:00
end
failure_message do
2012-08-29 01:49:26 -04:00
"expected #{described_class} to include the #{expected} module"
end
end