From e054202c2b0acbd2bf83d85bf473b3a9568985ef Mon Sep 17 00:00:00 2001 From: Jason Watson Date: Mon, 30 Aug 2010 22:35:15 +0100 Subject: [PATCH 1/6] fix load errors in ruby 1.9.2. --- test/suite.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/suite.rb b/test/suite.rb index 17a707b6..64591518 100644 --- a/test/suite.rb +++ b/test/suite.rb @@ -3,7 +3,7 @@ require 'test/unit' # for some reason these tests fail when run via TextMate # but succeed when run on the command line. -tests = Dir["#{File.dirname(__FILE__)}/test_*.rb"] +tests = Dir[File.expand_path("#{File.dirname(__FILE__)}/test_*.rb")] tests.each do |file| require file end \ No newline at end of file From e53a5407b9749cac7d5a60879b6c88ef9dc8a814 Mon Sep 17 00:00:00 2001 From: Jason Watson Date: Mon, 30 Aug 2010 22:55:39 +0100 Subject: [PATCH 2/6] Test::Unit is no longer ships with Ruby. --- test/suite.rb | 2 ++ 1 file changed, 2 insertions(+) diff --git a/test/suite.rb b/test/suite.rb index 64591518..98923ca1 100644 --- a/test/suite.rb +++ b/test/suite.rb @@ -1,3 +1,5 @@ +require 'rubygems' +gem 'test-unit' require 'test/unit' # for some reason these tests fail when run via TextMate From 4aae2a7bc77bce6d1c2e106c38beaf68a92ae661 Mon Sep 17 00:00:00 2001 From: Jason Watson Date: Mon, 30 Aug 2010 22:57:13 +0100 Subject: [PATCH 3/6] RedGreen is broken in 1.9.2. Test::Unit has colouring ability now. --- test/helper.rb | 1 - 1 file changed, 1 deletion(-) diff --git a/test/helper.rb b/test/helper.rb index 61636a4e..251b43c5 100644 --- a/test/helper.rb +++ b/test/helper.rb @@ -7,7 +7,6 @@ require 'RedCloth' require 'rdiscount' require 'test/unit' -require 'redgreen' require 'shoulda' require 'rr' From dc7a7d0090a538825132494700f343fb983ad6c1 Mon Sep 17 00:00:00 2001 From: Jason Watson Date: Mon, 30 Aug 2010 23:03:04 +0100 Subject: [PATCH 4/6] Updated for 1.9 encoding support. --- test/test_tags.rb | 2 ++ 1 file changed, 2 insertions(+) diff --git a/test/test_tags.rb b/test/test_tags.rb index d25aa705..5624cead 100644 --- a/test/test_tags.rb +++ b/test/test_tags.rb @@ -1,3 +1,5 @@ +# coding: utf-8 + require File.dirname(__FILE__) + '/helper' class TestTags < Test::Unit::TestCase From 75b93e3fa58a4d5cafc9f2dabc8c7a9610b50f50 Mon Sep 17 00:00:00 2001 From: Jason Watson Date: Mon, 30 Aug 2010 23:11:16 +0100 Subject: [PATCH 5/6] RDiscount is required to run the test suite. --- README.textile | 1 + 1 file changed, 1 insertion(+) diff --git a/README.textile b/README.textile index ebc4bf63..5895834b 100644 --- a/README.textile +++ b/README.textile @@ -35,6 +35,7 @@ h2. Developer Dependencies * Shoulda: Test framework (Ruby) * RR: Mocking (Ruby) * RedGreen: Nicer test output (Ruby) +* RDiscount: Discount Markdown Processor (Ruby) h2. License From de7e0011f9b8d3a59fc6203217990684df7e91f9 Mon Sep 17 00:00:00 2001 From: Jason Watson Date: Tue, 31 Aug 2010 03:41:00 +0100 Subject: [PATCH 6/6] Add some colouring to the unit tests. --- test/helper.rb | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/test/helper.rb b/test/helper.rb index 251b43c5..4026ecea 100644 --- a/test/helper.rb +++ b/test/helper.rb @@ -6,10 +6,13 @@ require File.join(File.dirname(__FILE__), *%w[.. lib jekyll]) require 'RedCloth' require 'rdiscount' -require 'test/unit' require 'shoulda' require 'rr' +require 'test/unit' +require 'test/unit/ui/console/testrunner' +class Test::Unit::UI::Console::TestRunner; def guess_color_availability; true; end; end + include Jekyll # Send STDERR into the void to suppress program output messages