From 71e7711aea9b0b9f40b39ce61ac681f652a3d4f7 Mon Sep 17 00:00:00 2001 From: Per Cederqvist <ceder@lysator.liu.se> Date: Fri, 18 Aug 2006 19:43:55 +0000 Subject: [PATCH] Generate the Simulation controller. --- app/controllers/simulation_controller.rb | 8 ++++++++ app/helpers/simulation_helper.rb | 2 ++ app/views/simulation/setup.rhtml | 2 ++ app/views/simulation/simulate.rhtml | 2 ++ test/functional/simulation_controller_test.rb | 18 ++++++++++++++++++ 5 files changed, 32 insertions(+) create mode 100644 app/controllers/simulation_controller.rb create mode 100644 app/helpers/simulation_helper.rb create mode 100644 app/views/simulation/setup.rhtml create mode 100644 app/views/simulation/simulate.rhtml create mode 100644 test/functional/simulation_controller_test.rb diff --git a/app/controllers/simulation_controller.rb b/app/controllers/simulation_controller.rb new file mode 100644 index 0000000..efe40c6 --- /dev/null +++ b/app/controllers/simulation_controller.rb @@ -0,0 +1,8 @@ +class SimulationController < ApplicationController + + def simulate + end + + def setup + end +end diff --git a/app/helpers/simulation_helper.rb b/app/helpers/simulation_helper.rb new file mode 100644 index 0000000..dfde8dc --- /dev/null +++ b/app/helpers/simulation_helper.rb @@ -0,0 +1,2 @@ +module SimulationHelper +end diff --git a/app/views/simulation/setup.rhtml b/app/views/simulation/setup.rhtml new file mode 100644 index 0000000..1ba19e7 --- /dev/null +++ b/app/views/simulation/setup.rhtml @@ -0,0 +1,2 @@ +<h1>Simulation#setup</h1> +<p>Find me in app/views/simulation/setup.rhtml</p> diff --git a/app/views/simulation/simulate.rhtml b/app/views/simulation/simulate.rhtml new file mode 100644 index 0000000..c769da5 --- /dev/null +++ b/app/views/simulation/simulate.rhtml @@ -0,0 +1,2 @@ +<h1>Simulation#simulate</h1> +<p>Find me in app/views/simulation/simulate.rhtml</p> diff --git a/test/functional/simulation_controller_test.rb b/test/functional/simulation_controller_test.rb new file mode 100644 index 0000000..c8ce1f7 --- /dev/null +++ b/test/functional/simulation_controller_test.rb @@ -0,0 +1,18 @@ +require File.dirname(__FILE__) + '/../test_helper' +require 'simulation_controller' + +# Re-raise errors caught by the controller. +class SimulationController; def rescue_action(e) raise e end; end + +class SimulationControllerTest < Test::Unit::TestCase + def setup + @controller = SimulationController.new + @request = ActionController::TestRequest.new + @response = ActionController::TestResponse.new + end + + # Replace this with your real tests. + def test_truth + assert true + end +end -- GitLab