I am building a mid-size application using Sinatra and everything was fine when I had one app.rb file and I followed Aslak instructions on Github:
https://github.com/cucumber/cucumber/wiki/Sinatra
As the application got bigger and bigger and the app.rb file started to grow in size, I reorganized a lot of bits into middleware-style modules using Sinatra :: Base, displaying things using an extension file (config .ru). ) etc.
The application works well - but my specs exploded because there was no longer an app.rb file for working with webrat (as defined in the link above).
I tried to find examples of how to do this, and I think I'm just not used to Cuke's internals, as I cannot find a single way to cover all applications. I tried just pointing to "config.ru" instead of app.rb - but this does not work.
What I did in the end - and this is completely hacking - is the presence of a separate app.rb file in my support directory, which has everything you need so that I can at least test the model. I can also indicate the routes there - but this is not at all what I want to do.
So the question is: how can I get Cucumber to work correctly with a modular approach to applications?
user1151
source
share