Skip to content

Commit

Permalink
Use hardcoded command
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexB52 committed Nov 23, 2024
1 parent b0d7906 commit 1aa72d8
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
8 changes: 7 additions & 1 deletion lib/retest/command.rb
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,9 @@ def command
end

def options_command
return params[:command] if params[:command]
if params[:command]
return hardcoded_command(params[:command])
end

if params[:rspec] then rspec_command
elsif params[:rails] then rails_command
Expand Down Expand Up @@ -59,6 +61,10 @@ def log(message)
@stdout&.puts(message)
end

def hardcoded_command(command)
Hardcoded.new(command: command)
end

def rspec_command
Rspec.new(all: full_suite?)
end
Expand Down
3 changes: 2 additions & 1 deletion lib/retest/runners/runner.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,10 @@ class Runner
include Observable

attr_accessor :command, :stdout
def initialize(command, stdout: $stdout)
def initialize(command, stdout: $stdout, command2: nil)
@stdout = stdout
@command = command
@command2 = command2
end

def ==(obj)
Expand Down

0 comments on commit 1aa72d8

Please sign in to comment.