mirror of
https://github.com/jekyll/jekyll.git
synced 2026-04-28 03:01:03 -04:00
Stubbing out configuration with RR and making sure include tags get rendered
This commit is contained in:
@@ -3,10 +3,13 @@ require File.join(File.dirname(__FILE__), *%w[.. lib jekyll])
|
||||
require 'test/unit'
|
||||
require 'redgreen'
|
||||
require 'shoulda'
|
||||
require 'rr'
|
||||
|
||||
include Jekyll
|
||||
|
||||
class Test::Unit::TestCase
|
||||
include RR::Adapters::TestUnit
|
||||
|
||||
def dest_dir
|
||||
File.join(File.dirname(__FILE__), *%w[dest])
|
||||
end
|
||||
|
||||
@@ -13,9 +13,8 @@ class TestPost < Test::Unit::TestCase
|
||||
context "A Post" do
|
||||
setup do
|
||||
clear_dest
|
||||
@source = File.join(File.dirname(__FILE__), *%w[source])
|
||||
@configuration = Jekyll.configuration 'source' => @source, 'destination' => dest_dir
|
||||
@site = Site.new(@configuration)
|
||||
stub(Jekyll).configuration { Jekyll::DEFAULTS }
|
||||
@site = Site.new(Jekyll.configuration)
|
||||
end
|
||||
|
||||
should "ensure valid posts are valid" do
|
||||
@@ -126,7 +125,7 @@ class TestPost < Test::Unit::TestCase
|
||||
assert_equal "<<< <p>url: /2008/11/21/complex.html<br />\ndate: #{Time.parse("2008-11-21")}<br />\nid: /2008/11/21/complex</p> >>>", post.output
|
||||
end
|
||||
|
||||
should_eventually "include templates" do
|
||||
should "include templates" do
|
||||
post = setup_post("2008-12-13-include.markdown")
|
||||
post.site.source = File.join(File.dirname(__FILE__), 'source')
|
||||
do_render(post)
|
||||
|
||||
Reference in New Issue
Block a user