Commit 10967cd2 authored by Jonathan Riddell's avatar Jonathan Riddell 🛶

testing

parent 71906451
Gemfile.lock
test/data/*.testout
......@@ -39,13 +39,12 @@ class MetaInfoUpdater
@doc = File.open(@filename) { |f| Nokogiri::XML(f, &:noblanks) }
component = @doc.at_css("component")
releases = component.add_child("<releases><release version='1.0' date='today'/></releases>")
puts component.to_xml(:indent => 2)
end
def save_file
#File.write("#{@filename}.new", @doc.to_xml(:indent => 2))
save_file_name = @filename
save_file_name = "#{@filename}.new" if @testing
save_file_name = "#{@filename}.testout" if @testing
f = File.open(save_file_name, "w")
@doc.write_xml_to(f, {indent: 2})
end
......
......@@ -9,6 +9,6 @@ class MetaInfoUpdaterTest < MiniTest::Unit::TestCase
# open the __FILE__
# do the thing
# compare the file
assert_equal(true, true)
assert_equal(File.read("data/no-releases.appdata.xml.testout"), File.read("data/no-releases.appdata.xml.good"))
end
end
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment