# File lib/merb-core/test/matchers/view_matchers.rb, line 58 def matches?(target) @errors = [] unless target.include?("<#{@name}") @errors << "Expected a <#{@name}>, but was #{target}" end @attrs.each do |attr, val| unless target.include?("#{attr}=\"#{val}\"") @errors << "Expected #{attr}=\"#{val}\", but was #{target}" end end if @content unless target.include?(">#{@content}<") @errors << "Expected #{target} to include #{@content}" end end @errors.size == 0 end