the spec_helper.rb in a generated app looks like this:
# frozen_string_literal: true require "pathname" SPEC_ROOT = Pathname(__dir__).realpath.freeze ENV["HANAMI_ENV"] ||= "test" require "hanami/prepare" require_relative "support/rspec" require_relative "support/requests"
HANAMI_ENV is set with
||=. This could be dangerous for users who executes tests in i.a. a docker-container, where HANAMI_ENV is set at compose-time to development.
Why not setting HANAMI_ENV to test:
ENV["HANAMI_ENV"] = "test"
Or are there scenarios, where tests should be executed in antother HANAMI_ENV?