diff options
author | Guillermo Iguaran <guilleiguaran@gmail.com> | 2019-02-12 10:59:39 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-02-12 10:59:39 -0500 |
commit | 2edeb438e6d5289cd0227fb73ab731839177fed6 (patch) | |
tree | 8d71c609d60e2fc5604d2c7da6d0407fc5ff592e /actionpack/test/dispatch | |
parent | ad3cbc2452e8150542ecb539925396361f12534c (diff) | |
parent | 6052fa9288c97be008acaa7eaed279ca55465ed7 (diff) | |
download | rails-2edeb438e6d5289cd0227fb73ab731839177fed6.tar.gz rails-2edeb438e6d5289cd0227fb73ab731839177fed6.tar.bz2 rails-2edeb438e6d5289cd0227fb73ab731839177fed6.zip |
Merge pull request #35175 from drn/create-session
Support testing of non-ActionDispatch-routed apps.
Diffstat (limited to 'actionpack/test/dispatch')
-rw-r--r-- | actionpack/test/dispatch/routing/non_dispatch_routed_app_test.rb | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/actionpack/test/dispatch/routing/non_dispatch_routed_app_test.rb b/actionpack/test/dispatch/routing/non_dispatch_routed_app_test.rb new file mode 100644 index 0000000000..676a8c38d4 --- /dev/null +++ b/actionpack/test/dispatch/routing/non_dispatch_routed_app_test.rb @@ -0,0 +1,27 @@ +# frozen_string_literal: true + +require "abstract_unit" + +module ActionDispatch + module Routing + class NonDispatchRoutedAppTest < ActionDispatch::IntegrationTest + # For example, Grape::API + class SimpleApp + def self.call(env) + [ 200, { "Content-Type" => "text/plain" }, [] ] + end + + def self.routes + [] + end + end + + setup { @app = SimpleApp } + + test "does not except" do + get "/foo" + assert_response :success + end + end + end +end |