I'm not sure this is the most common usage pattern, but I am developing a modular application with multiple Apps mounted in config.ru like this:
map('/account') { run AccountController }
# ...
map('/') { run HomeController }
If I use the code suggested, which defines app at the top level and run it with Rake::TestTask, the code will fail and only one app will be loaded (I believe the last one defined).
I'm not sure this is the most common usage pattern, but I am developing a modular application with multiple Apps mounted in
config.ru
like this:If I use the code suggested, which defines
app
at the top level and run it withRake::TestTask
, the code will fail and only one app will be loaded (I believe the last one defined).https://github.com/sinatra/sinatra-recipes/blob/master/testing/minitest.md#specs-and-benchmarks-with-minitest
I've fixed the issue by defining
app
within thedescribe
block.Perhaps the documentation should be adjusted, or at least a note added for testing multiple applications in the same test suite?
Thanks!