X-Git-Url: https://projects.mako.cc/source/selectricity-live/blobdiff_plain/dc635b6d39be19a09a428282b6d639d029908df6..22f84a3ea8bc39eb4cb91575d35dfca683336032:/vendor/plugins/gruff/generators/gruff/templates/functional_test.rb diff --git a/vendor/plugins/gruff/generators/gruff/templates/functional_test.rb b/vendor/plugins/gruff/generators/gruff/templates/functional_test.rb new file mode 100644 index 0000000..c1f0818 --- /dev/null +++ b/vendor/plugins/gruff/generators/gruff/templates/functional_test.rb @@ -0,0 +1,24 @@ +require File.dirname(__FILE__) + '<%= '/..' * controller_class_name.split("::").length %>/test_helper' +require '<%= parent_folder_for_require %><%= controller_file_name %>_controller' + +# Re-raise errors caught by the controller. +class <%= controller_class_name %>Controller; def rescue_action(e) raise e end; end + +class <%= controller_class_name %>ControllerTest < Test::Unit::TestCase + + #fixtures :data + + def setup + @controller = <%= controller_class_name %>Controller.new + @request = ActionController::TestRequest.new + @response = ActionController::TestResponse.new + end + + # TODO Replace this with your actual tests + def test_show + get :show + assert_response :success + assert_equal 'image/png', @response.headers['Content-Type'] + end + +end