As per sinatra documentation, we use configure block to run something once at startup. http://sinatrarb.com/intro.html
Consider, the below configure where I am fetching the credentials using Creds class and setting to creds.
configure do
# setting at startup
set :creds, Creds.fetch_creds
end
While writing the unit tests using mocha, how can I stub this fetch_creds method? Please guide.