require 'test_helper' require 'markdo/rss_command' module Markdo describe RssCommand do it 'outputs RSS from the input Markdown' do out = StringIO.new err = StringIO.new env = { 'MARKDO_ROOT' => 'test/fixtures' } RssCommand.new(out, err, env).run xml_must_equal out.string, <<-XML Links in Markdo Task with HTTP URL http://www.example.com/ http://www.example.com/ Task with HTTPS URL https://www.example.com/ https://www.example.com/ Task with HTTP URL http://www.example.com/ and trailing text http://www.example.com/ XML end def xml_must_equal(actual, expected) actual.must_equal(expected.gsub(/^\s*/, '')) end end end