Permalink
Browse files

added spec for index page

  • Loading branch information...
1 parent 8c06a7d commit c6964f7e7b232a2b8b1e814fbf99c4bcbaeb1d3a @ludicast committed Oct 25, 2011
Showing with 10 additions and 0 deletions.
  1. +9 −0 spec/controllers/pages_controller_spec.rb
  2. +1 −0 spec/dummy/app/views/pages/dir/index.html.erb
@@ -28,6 +28,15 @@
end
end
+ describe "on GET to /pages/dir" do
+ before { get :show, :id => 'dir' }
+
+ it "should respond with success and render index template" do
+ response.should be_success
+ response.should render_template('pages/dir/index')
+ end
+ end
+
it "should raise a routing error for an invalid page" do
lambda { get :show, :id => "invalid" }.should raise_error(ActionController::RoutingError)
end
@@ -0,0 +1 @@
+hello <%= 'world' %> from index page

0 comments on commit c6964f7

Please sign in to comment.