summaryrefslogtreecommitdiff
path: root/users/test/integration/api/rack_test.rb
diff options
context:
space:
mode:
authorAzul <azul@leap.se>2013-04-03 11:22:16 +0200
committerAzul <azul@leap.se>2013-04-03 11:22:16 +0200
commit654ab25fa4659119d5ddaa9ae116fce69a386ab1 (patch)
tree0f0adf5a0c92a20a7084c251dafac7a420f9b640 /users/test/integration/api/rack_test.rb
parentf4172ac9ea7a484659fa2019119533bc9569880f (diff)
make sure user tests also run when run from users subdir
* The APP_CONFIG needs to be initialized in core so that is required from other engines * paths for load_views need to be relative to the model - not to rails root.
Diffstat (limited to 'users/test/integration/api/rack_test.rb')
-rw-r--r--users/test/integration/api/rack_test.rb12
1 files changed, 12 insertions, 0 deletions
diff --git a/users/test/integration/api/rack_test.rb b/users/test/integration/api/rack_test.rb
new file mode 100644
index 0000000..da960f2
--- /dev/null
+++ b/users/test/integration/api/rack_test.rb
@@ -0,0 +1,12 @@
+CONFIG_RU = (Rails.root + 'config.ru').to_s
+OUTER_APP = Rack::Builder.parse_file(CONFIG_RU).first
+
+class RackTest < ActiveSupport::TestCase
+ include Rack::Test::Methods
+ include Warden::Test::Helpers
+ include LeapWebCore::AssertResponses
+
+ def app
+ OUTER_APP
+ end
+end