Sha256: 134527b059603710c28312d8cda170719c335208bce40af794be630bd94f15eb

Contents?: true

Size: 632 Bytes

Versions: 12

Compression:

Stored size: 632 Bytes

Contents

# frozen_string_literal: true

require "dry/inflector"

RSpec.describe Hanami::Config, "#render_errors" do
  let(:config) { described_class.new(app_name: app_name, env: env) }
  let(:app_name) { Hanami::SliceName.new(double(name: "MyApp::App"), inflector: Dry::Inflector.new) }

  subject(:render_errors) { config.render_errors }

  context "development mode" do
    let(:env) { :development }
    it { is_expected.to be false }
  end

  context "test mode" do
    let(:env) { :test }
    it { is_expected.to be false }
  end

  context "production mode" do
    let(:env) { :production }
    it { is_expected.to be true }
  end
end

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
hanami-2.2.1 spec/unit/hanami/config/render_errors_spec.rb
hanami-2.2.0 spec/unit/hanami/config/render_errors_spec.rb
hanami-2.2.0.rc1 spec/unit/hanami/config/render_errors_spec.rb
hanami-2.2.0.beta2 spec/unit/hanami/config/render_errors_spec.rb
hanami-2.2.0.beta1 spec/unit/hanami/config/render_errors_spec.rb
hanami-2.1.0 spec/unit/hanami/config/render_errors_spec.rb
hanami-2.1.0.rc3 spec/unit/hanami/config/render_errors_spec.rb
hanami-2.1.0.rc2 spec/unit/hanami/config/render_errors_spec.rb
hanami-2.1.0.rc1 spec/unit/hanami/config/render_errors_spec.rb
hanami-2.1.0.beta2.1 spec/unit/hanami/config/render_errors_spec.rb
hanami-2.1.0.beta2 spec/unit/hanami/config/render_errors_spec.rb
hanami-2.1.0.beta1 spec/unit/hanami/config/render_errors_spec.rb