Sinatra env['SERVER_NAME'] tests use www.example.com by default. How can I install this in some arbitrary domain?
Capybara has a .default_host method but does not use Capybara.
Or is it possible to change env [ DEFAULT_HOST ]?
Using RSpec, Sinatra, WebMock.
EDIT: adding env['SERVER_NAME'] = 'www.foo.com' to RSpec checks for an exception:
NameError: undefined local variable or method 'env' for #<RSpec::Core::ExampleGroup::Nested_1::Nested_1:0x007fe6ce3b5ff8>
source share