test/test_router.rb in lanyon-0.4.3 vs test/test_router.rb in lanyon-0.4.4
- old
+ new
@@ -158,16 +158,16 @@
end
describe "when 404.html does exist" do
before do
- @custom_404 = File.join(@sitedir, "404.html")
- File.open(@custom_404, "w") {|f| f.print "Custom 404" }
+ @custom_404_file = File.join(@sitedir, "404.html")
+ File.open(@custom_404_file, "w") {|f| f.print "Custom 404" }
end
after do
- FileUtils.rm(@custom_404)
+ FileUtils.rm(@custom_404_file)
end
it "returns correct body" do
_(@router.custom_404_body).must_equal "Custom 404"
end
@@ -176,10 +176,10 @@
describe "when initialized" do
it "strips trailing slash from root" do
- router = Lanyon::Router.new(@sitedir + "/")
+ router = Lanyon::Router.new("#{@sitedir}/")
_(router.root).must_equal @sitedir
end
it "does not append a trailing slash to root" do
assert !@sitedir.end_with?("/")