spec/support/matchers.rb in ruby_speech-2.0.1 vs spec/support/matchers.rb in ruby_speech-2.0.2
- old
+ new
@@ -12,16 +12,10 @@
def initialize(type, schema)
@type, @schema = type, schema
end
def subject=(s)
- if s.is_a? Nokogiri::XML::Document
- @subject = s
- else
- doc = Nokogiri::XML::Document.new
- doc << s.to_xml
- @subject = doc
- end
+ @subject = Nokogiri::XML(s.to_xml)
end
def failure_message
" expected #{subject} to be a valid #{type} document\n#{errors}"
end