Skip to content

Commit

Permalink
fix: rename last uses of Command into EasyCommand (#22)
Browse files Browse the repository at this point in the history
  • Loading branch information
Aquaj authored Aug 7, 2024
1 parent 25f496f commit d7ec6ff
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/easy_command/spec_helpers/mock_command_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ def mock_command(command, success:, result: nil, errors: {}, params: NO_PARAMS_P
klass = Object.const_get('FakeCommandErrors')
else
klass = Object.const_set 'FakeCommandErrors', Class.new
klass.prepend Command
klass.prepend EasyCommand
end
fake_command = klass.new
if errors.any?
Expand All @@ -46,9 +46,9 @@ def mock_command(command, success:, result: nil, errors: {}, params: NO_PARAMS_P
allow(double).to receive(:errors).and_return(fake_command.errors)
monad =
if success
Command::Success.new(result)
EasyCommand::Success.new(result)
else
Command::Failure.new(result).with_errors(fake_command.errors)
EasyCommand::Failure.new(result).with_errors(fake_command.errors)
end
allow(double).to receive(:call).and_return(monad)
allow(double).to receive(:on_success).and_return(double)
Expand Down

0 comments on commit d7ec6ff

Please sign in to comment.