sinatra-pages 0.5.5 → 0.5.6
Sign up to get free protection for your applications and to get access to all the features.
- data/spec/pages_spec.rb +3 -0
- metadata +1 -1
data/spec/pages_spec.rb
CHANGED
@@ -26,6 +26,7 @@ describe Sinatra::Pages do
|
|
26
26
|
context "uses HTTP GET request method" do
|
27
27
|
context "with no Layout file" do
|
28
28
|
it "should render just the Home page if the given route is either empty or root." do
|
29
|
+
File.exist?("views/#{file_of.('Layout')}.haml").should be_false
|
29
30
|
File.exist?("views/#{file_of.('Home')}.haml").should be_true
|
30
31
|
|
31
32
|
['/', ''].each do |route|
|
@@ -38,6 +39,7 @@ describe Sinatra::Pages do
|
|
38
39
|
|
39
40
|
it "should render just an existing page if the given route match the '/:page' pattern." do
|
40
41
|
PAGES.each do |page|
|
42
|
+
File.exist?("views/#{file_of.('Layout')}.haml").should be_false
|
41
43
|
File.exist?("views/#{file_of.(page)}.haml").should be_true
|
42
44
|
|
43
45
|
get "/#{file_of.(page)}"
|
@@ -48,6 +50,7 @@ describe Sinatra::Pages do
|
|
48
50
|
end
|
49
51
|
|
50
52
|
it "should render just the Not Found page if a given route can't find its static page on 'views/'." do
|
53
|
+
File.exist?("views/#{file_of.('Layout')}.haml").should be_false
|
51
54
|
File.exist?("views/#{file_of.('Do Not Exist')}.haml").should be_false
|
52
55
|
|
53
56
|
get "/#{file_of.('Do Not Exist')}"
|