Skip to content

Commit

Permalink
Fix spec
Browse files Browse the repository at this point in the history
  • Loading branch information
zw963 committed Nov 6, 2024
1 parent 0a0d936 commit c6a50b7
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 9 deletions.
2 changes: 2 additions & 0 deletions spec/spec_helper.cr
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
require "spec"
require "yaml"
require "../src/procodile/procfile_option"
APPS_ROOT = File.expand_path("apps", __DIR__)

# require "../src/procodile"
4 changes: 0 additions & 4 deletions spec/specs/app_determination_spec.cr
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ describe Procodile::AppDetermination do
pwd: "/",
given_root: "/app",
given_procfile: "Procfile",
global_options: nil
)
ap.root.should eq "/app"
ap.procfile.should eq "/app/Procfile"
Expand All @@ -18,7 +17,6 @@ describe Procodile::AppDetermination do
pwd: "/",
given_root: "/app/",
given_procfile: "Procfile",
global_options: nil
)
ap.root.should eq "/app"
ap.procfile.should eq "/app/Procfile"
Expand All @@ -29,7 +27,6 @@ describe Procodile::AppDetermination do
pwd: "/home",
given_root: "/some/app",
given_procfile: nil,
global_options: nil
)
ap.root.should eq "/some/app"
ap.procfile.should be_nil
Expand All @@ -40,7 +37,6 @@ describe Procodile::AppDetermination do
pwd: "/app",
given_root: nil,
given_procfile: "/myapps/Procfile",
global_options: nil
)
ap.root.should eq "/myapps"
ap.procfile.should eq "/myapps/Procfile"
Expand Down
6 changes: 3 additions & 3 deletions spec/specs/config_spec.cr
Original file line number Diff line number Diff line change
Expand Up @@ -120,11 +120,11 @@ describe Procodile::Config do
end

it "should be able to return options for a process" do
config.options_for_process("proc1").should be_a Procodile::ProcessOption
config.options_for_process("proc1").should be_a Procodile::Process::Option
config.options_for_process("proc1").quantity.should eq 2
config.options_for_process("proc1").restart_mode.should eq Signal::USR2
config.options_for_process("proc2").should be_a Procodile::ProcessOption
config.options_for_process("proc2").should eq Procodile::ProcessOption.new
config.options_for_process("proc2").should be_a Procodile::Process::Option
config.options_for_process("proc2").should eq Procodile::Process::Option.new
end
end

Expand Down
4 changes: 2 additions & 2 deletions spec/specs/procfile_option_spec.cr
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ describe Procodile::ProcfileOption do
procfile_option.exec_prefix.should eq "bundle exec"
procfile_option.env.should eq({"RAILS_ENV" => "production", "FRUIT" => "apple", "VEGETABLE" => "potato", "PORT" => "3000"})

procfile_option.processes.should be_a Hash(String, Procodile::ProcessOption)
procfile_option.processes.should be_a Hash(String, Procodile::Process::Option)

process_option = Procodile::ProcessOption.new
process_option = Procodile::Process::Option.new
process_option.quantity = 2
process_option.restart_mode = Signal::USR2
process_option.term_signal = Signal::TERM
Expand Down

0 comments on commit c6a50b7

Please sign in to comment.