aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/examples/simple.rb
diff options
context:
space:
mode:
Diffstat (limited to 'actionpack/examples/simple.rb')
-rw-r--r--actionpack/examples/simple.rb17
1 files changed, 17 insertions, 0 deletions
diff --git a/actionpack/examples/simple.rb b/actionpack/examples/simple.rb
new file mode 100644
index 0000000000..4ecb824688
--- /dev/null
+++ b/actionpack/examples/simple.rb
@@ -0,0 +1,17 @@
+$LOAD_PATH.unshift "#{File.dirname(__FILE__)}/../lib"
+require 'action_controller'
+
+class PeopleController < ActionController::Base
+ def index
+ head :ok
+ end
+end
+
+status, headers, body = PeopleController.action(:index).call({ 'rack.input' => StringIO.new('') })
+
+puts status
+puts headers.to_yaml
+puts '---'
+body.each do |part|
+ puts part
+end