| 1 |
RSpec::Matchers.define :be_contained_in do |expected| |
| 2 |
match do |actual| |
| 3 |
@query = ParserSupport.parser.find_by_selector(actual, expected) |
| 4 |
@query.any? |
| 5 |
end |
| 6 |
|
| 7 |
failure_message do |actual| |
| 8 |
%{expected selector #{actual} to be contained in #{expected}} |
| 9 |
end |
| 10 |
end |