sinatra-pages 0.1.0 → 0.2.0
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/lib/sinatra/pages.rb +1 -1
- data/spec/pages_spec.rb +8 -6
- metadata +1 -1
data/lib/sinatra/pages.rb
CHANGED
data/spec/pages_spec.rb
CHANGED
@@ -13,16 +13,18 @@ describe Sinatra::Pages do
|
|
13
13
|
end
|
14
14
|
|
15
15
|
context "when using the HTTP GET request method" do
|
16
|
-
it "should render the Home page if the given route is
|
16
|
+
it "should render the Home page if the given route is either empty or root." do
|
17
17
|
File.exist?('views/home.haml').should be_true
|
18
18
|
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
19
|
+
%w[/ /?].each do |route|
|
20
|
+
get route
|
21
|
+
|
22
|
+
last_response.should be_ok
|
23
|
+
last_response.body.chomp.should == 'Home'
|
24
|
+
end
|
23
25
|
end
|
24
26
|
end
|
25
|
-
|
27
|
+
|
26
28
|
after :all do
|
27
29
|
FileUtils.rm_r 'views', :force => true
|
28
30
|
end
|