lib/retest/command/rspec.rb in retest-1.1.0 vs lib/retest/command/rspec.rb in retest-1.2.0

- old
+ new

@@ -1,20 +1,20 @@ module Retest class Command - Rspec = Struct.new(:all, :bin_file) do - def self.command(all:, bin_file: File.exist?('bin/rspec')) - new(all, bin_file).command + Rspec = Struct.new(:all, :file_system) do + def self.command(all:, file_system: FileSystem) + new(all, file_system).command end def command return "#{root_command} <test>" unless all root_command end private def root_command - return 'bin/rspec' if bin_file + return 'bin/rspec' if file_system.exist? 'bin/rspec' 'bundle exec rspec' end end end \ No newline at end of file