Permalink
Browse files

fix tests for command line

  • Loading branch information...
1 parent 31d7e80 commit 2a8345df8211d619e8ed9f734b6415ca66174e4d @mojombo mojombo committed Dec 13, 2008
Showing with 7 additions and 4 deletions.
  1. +4 −1 test/suite.rb
  2. +3 −3 test/test_post.rb
View
@@ -1,6 +1,9 @@
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.each do |file|
require file
-end
+end
View
@@ -56,15 +56,15 @@ def test_transform
p.read_yaml(File.join(File.dirname(__FILE__), *%w[source _posts]), "2008-10-18-foo-bar.textile")
p.transform
- assert_equal "<h1>{{ page.title }}</h1>\n\n\n\t<p>Best <strong>post</strong> ever</p>", p.content
+ assert_equal "<h1>{{ page.title }}</h1>\n<p>Best <strong>post</strong> ever</p>", p.content
end
def test_add_layout
p = Post.new(File.join(File.dirname(__FILE__), *%w[source _posts]), "2008-10-18-foo-bar.textile")
layouts = {"default" => Layout.new(File.join(File.dirname(__FILE__), *%w[source _layouts]), "simple.html")}
p.add_layout(layouts, {"site" => {"posts" => []}})
- assert_equal "<<< <h1>Foo Bar</h1>\n\n\n\t<p>Best <strong>post</strong> ever</p> >>>", p.output
+ assert_equal "<<< <h1>Foo Bar</h1>\n<p>Best <strong>post</strong> ever</p> >>>", p.output
end
def test_write
@@ -81,6 +81,6 @@ def test_data
layouts = {"default" => Layout.new(File.join(File.dirname(__FILE__), *%w[source _layouts]), "simple.html")}
p.add_layout(layouts, {"site" => {"posts" => []}})
- assert_equal "<<< <p>url: /2008/11/21/complex.html\ndate: Fri Nov 21 00:00:00 -0800 2008\nid: /2008/11/21/complex</p> >>>", p.output
+ assert_equal "<<< <p>url: /2008/11/21/complex.html<br />\ndate: Fri Nov 21 00:00:00 -0800 2008<br />\nid: /2008/11/21/complex</p> >>>", p.output
end
end

0 comments on commit 2a8345d

Please sign in to comment.