Skip to content

Commit

Permalink
Use new recommended default: kwarg in settings
Browse files Browse the repository at this point in the history
  • Loading branch information
waiting-for-dev committed May 19, 2021
1 parent 107c8be commit d23a0b1
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion spec/new_integration/application_settings_spec.rb
Expand Up @@ -27,7 +27,7 @@ class Application < Hanami::Application
setting :database_url
setting :redis_url
setting :feature_flag, constructor: TestApp::Types::Params::Bool
setting :feature_flag_with_default, false, constructor: TestApp::Types::Params::Bool
setting :feature_flag_with_default, default: false, constructor: TestApp::Types::Params::Bool
end
RUBY

Expand Down
4 changes: 2 additions & 2 deletions spec/unit/hanami/application/settings/loader_spec.rb
Expand Up @@ -26,7 +26,7 @@ def build_config(&block)
context "when settings are defined" do
it "uses values from the store when present" do
config = build_config do
setting :database_url, "postgres://localhost/test_app_development"
setting :database_url, default: "postgres://localhost/test_app_development"
end
store = { database_url: "mysql://localhost/test_app_development" }.freeze

Expand All @@ -37,7 +37,7 @@ def build_config(&block)

it "uses defaults when values are not present in the store" do
config = build_config do
setting :database_url, "postgres://localhost/test_app_development"
setting :database_url, default: "postgres://localhost/test_app_development"
end
store = {}.freeze

Expand Down

0 comments on commit d23a0b1

Please sign in to comment.