sinatra-pages 0.5.0 → 0.5.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/spec/pages_spec.rb +3 -3
- metadata +1 -1
data/spec/pages_spec.rb
CHANGED
@@ -26,7 +26,7 @@ describe Sinatra::Pages do
|
|
26
26
|
|
27
27
|
context "when using the HTTP GET request method" do
|
28
28
|
context "and there is no Layout file" do
|
29
|
-
it "should render the
|
29
|
+
it "should render the Home page only if the given route is either empty or root." do
|
30
30
|
File.exist?("views/#{file_of.('Home')}.haml").should be_true
|
31
31
|
|
32
32
|
['/', ''].each do |route|
|
@@ -37,7 +37,7 @@ describe Sinatra::Pages do
|
|
37
37
|
end
|
38
38
|
end
|
39
39
|
|
40
|
-
it "should render
|
40
|
+
it "should render an existing page only if the given route match the '/:page' pattern." do
|
41
41
|
PAGES.each do |page|
|
42
42
|
File.exist?("views/#{file_of.(page)}.haml").should be_true
|
43
43
|
|
@@ -48,7 +48,7 @@ describe Sinatra::Pages do
|
|
48
48
|
end
|
49
49
|
end
|
50
50
|
|
51
|
-
it "should render the
|
51
|
+
it "should render the Not Found page only if a given route can't find its static page on 'views/'." do
|
52
52
|
File.exist?("views/#{file_of.('Do Not Exist')}.haml").should be_false
|
53
53
|
|
54
54
|
get "/#{file_of.('Do Not Exist')}"
|