diff --git a/mise.toml b/mise.toml new file mode 100644 index 00000000..becf7706 --- /dev/null +++ b/mise.toml @@ -0,0 +1,2 @@ +[tools] +ruby = "3.4" diff --git a/spec/gotsha/action_dispatcher_spec.rb b/spec/gotsha/action_dispatcher_spec.rb index 36e909e1..27c37b96 100644 --- a/spec/gotsha/action_dispatcher_spec.rb +++ b/spec/gotsha/action_dispatcher_spec.rb @@ -1,6 +1,14 @@ # frozen_string_literal: true RSpec.describe Gotsha::ActionDispatcher do + before do + allow(Gotsha::UserConfig).to receive(:blank?).and_return(false) + allow(Gotsha::UserConfig).to receive(:get).with(:ci).and_return(false) + allow(Gotsha::UserConfig).to receive(:get).with(:autogenerated).and_return(false) + allow(Gotsha::BashCommand).to receive(:run!).with("git config core.hooksPath") + .and_return(instance_double(Gotsha::BashCommand, text_output: Gotsha::Config::HOOKS_DIR)) + end + describe "without any action name" do it "calls Help action" do expect_any_instance_of(Gotsha::Actions::Help).to receive(:call)