Switch to a Commander base to allow lazy loading config

This commit is contained in:
David Heinemeier Hansson
2023-01-12 14:58:17 +01:00
parent d3ab10be22
commit 4aa96d6578
10 changed files with 93 additions and 68 deletions

View File

@@ -1,6 +1,6 @@
require "test_helper"
require "mrsk/configuration"
require "mrsk/commands"
require "mrsk/commands/app"
ENV["VERSION"] = "123"
ENV["RAILS_MASTER_KEY"] = "456"

12
test/commander_test.rb Normal file
View File

@@ -0,0 +1,12 @@
require "test_helper"
require "mrsk/commander"
class CommanderTest < ActiveSupport::TestCase
setup do
@mrsk = Mrsk::Commander.new config_file: Pathname.new(File.expand_path("fixtures/deploy.erb.yml", __dir__))
end
test "lazy configuration" do
assert_equal Mrsk::Configuration, @mrsk.config.class
end
end