]> projects.mako.cc - selectricity/blob - vendor/plugins/gruff/generators/gruff/templates/functional_test.rb
c1f08188b0c7ad1d23933f60b6d231dfa2049c01
[selectricity] / vendor / plugins / gruff / generators / gruff / templates / functional_test.rb
1 require File.dirname(__FILE__) + '<%= '/..' * controller_class_name.split("::").length %>/test_helper'
2 require '<%= parent_folder_for_require %><%= controller_file_name %>_controller'
3
4 # Re-raise errors caught by the controller.
5 class <%= controller_class_name %>Controller; def rescue_action(e) raise e end; end
6
7 class <%= controller_class_name %>ControllerTest < Test::Unit::TestCase
8
9   #fixtures :data
10
11   def setup
12     @controller = <%= controller_class_name %>Controller.new
13     @request    = ActionController::TestRequest.new
14     @response   = ActionController::TestResponse.new
15   end
16
17   # TODO Replace this with your actual tests
18   def test_show
19     get :show
20     assert_response :success
21     assert_equal 'image/png', @response.headers['Content-Type']
22   end
23   
24 end

Benjamin Mako Hill || Want to submit a patch?