tests/rfeedparsertest.rb in rfeedparser-0.9.8 vs tests/rfeedparsertest.rb in rfeedparser-0.9.9
- old
+ new
@@ -165,11 +165,11 @@
end
# default methods to be public
XMLTests.send(:public)
# add one unit test for each file
-Dir['**/*.xml'].each do |xmlfile| # Test a subset
+Dir['**/*.xml'].each do |xmlfile|
#Dir['tests/**/*.xml'].each do |xmlfile|
methname = "tests_"+xmlfile.gsub('/','_').sub('.xml','')
XMLTests.send(:define_method, methname) {
options = {}
@@ -178,12 +178,14 @@
# smart stripping of styles). This is not (yet) required, as
# rfeedparser is compatible by default.
# Evaluate feed
+
fp = FeedParser.parse("http://127.0.0.1:#{$PORT}/#{xmlfile}", options)
# I should point out that the 'compatible' arg is not necessary,
# but probably will be in the future if we decide to change the default.
+
description, evalString = scrape_assertion_strings(xmlfile)
assert fp.instance_eval(evalString), description.inspect
}
end
# Start up the mongrel server and tell it how to send the tests