changelog shortlog tags changeset manifest revisions annotate raw

vendor/plugins/rspec_on_rails/generators/rspec_controller/templates/controller_spec.rb

changeset 16: 01fd3f10ae84
author: moriq@moriq.com
date: Mon Mar 10 10:13:18 2008 +0900 (16 years ago)
permissions: -rw-r--r--
description: add plugins rspec_on_rails
1require File.dirname(__FILE__) + '<%= '/..' * class_nesting_depth %>/../spec_helper'
2
3describe <%= class_name %>Controller do
4
5<% if actions.empty? -%>
6 #Delete this example and add some real ones
7<% else -%>
8 #Delete these examples and add some real ones
9<% end -%>
10 it "should use <%= class_name %>Controller" do
11 controller.should be_an_instance_of(<%= class_name %>Controller)
12 end
13
14<% unless actions.empty? -%>
15<% for action in actions -%>
16
17 describe "GET '<%= action %>'" do
18 it "should be successful" do
19 get '<%= action %>'
20 response.should be_success
21 end
22 end
23<% end -%>
24<% end -%>
25end