test/test_suite.rb in octopress-3.0.0.rc.7 vs test/test_suite.rb in octopress-3.0.0.rc.8

- old
+ new

@@ -60,11 +60,15 @@ # } # def test(options) if cmd = options[:cmd] cmd = [cmd] unless cmd.is_a? Array - output = `#{cmd.join('; ')}`.gsub(/#{Dir.pwd}\/*/,'').strip + if options[:debug] + system cmd.join('; ') + else + output = `#{cmd.join('; ')}`.gsub(/#{Dir.pwd}\/*/,'').strip + end if options[:expect].strip == output pout '.'.green else pout 'F'.red @failures << { @@ -91,10 +95,10 @@ @failures.each do |test| puts "\nFailed: #{test[:desc]}" if test[:message] puts test[:message].yellow else - puts test[:expected].green + puts (test[:expected] || '').green puts test[:result].red end # print a newline for easier reading puts "" end