spec/unit/hanami/config/actions/default_values_spec.rb in hanami-2.1.0.beta1 vs spec/unit/hanami/config/actions/default_values_spec.rb in hanami-2.1.0.beta2

- old
+ new

@@ -1,11 +1,12 @@ # frozen_string_literal: true require "hanami/config/actions" RSpec.describe Hanami::Config::Actions, "default values" do - subject(:config) { described_class.new } + let(:app_config) { Hanami::Config.new(app_name: "MyApp::App", env: :development) } + subject(:config) { app_config.actions } describe "sessions" do specify { expect(config.sessions).not_to be_enabled } end @@ -26,10 +27,10 @@ specify { expect(config.content_security_policy).to be_kind_of(Hanami::Config::Actions::ContentSecurityPolicy) } end describe "default_headers" do specify { - config.finalize! + app_config.finalize! expect(config.default_headers).to eq( "X-Frame-Options" => "DENY", "X-Content-Type-Options" => "nosniff", "X-XSS-Protection" => "1; mode=block",