Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

added spec for index page

  • Loading branch information...
commit c6964f7e7b232a2b8b1e814fbf99c4bcbaeb1d3a 1 parent 8c06a7d
@ludicast authored
View
9 spec/controllers/pages_controller_spec.rb
@@ -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
View
1  spec/dummy/app/views/pages/dir/index.html.erb
@@ -0,0 +1 @@
+hello <%= 'world' %> from index page
Please sign in to comment.
Something went wrong with that request. Please try again.