Sha256: 504f2fc4f169b1d3268a41176e66b7afe072954c51bda4264903b77d7250c01a

Contents?: true

Size: 520 Bytes

Versions: 17

Compression:

Stored size: 520 Bytes

Contents

module Retest
  class Command
    class Rspec
      attr_reader :all, :file_system

      def initialize(all:, file_system: FileSystem)
        @file_system = file_system
        @all = all
      end

      def to_s
        return "#{root_command} <test>" unless all
        root_command
      end

      def format_batch(*files)
        files.join(' ')
      end

      private

      def root_command
        return 'bin/rspec' if file_system.exist? 'bin/rspec'

        'bundle exec rspec'
      end
    end
  end
end

Version data entries

17 entries across 17 versions & 1 rubygems

Version Path
retest-2.0.0.pre3 lib/retest/command/rspec.rb
retest-2.0.0.pre2 lib/retest/command/rspec.rb
retest-2.0.0.pre1 lib/retest/command/rspec.rb
retest-2.0.0.pre lib/retest/command/rspec.rb
retest-1.13.2 lib/retest/command/rspec.rb
retest-1.13.1 lib/retest/command/rspec.rb
retest-1.13.0 lib/retest/command/rspec.rb
retest-1.12.0 lib/retest/command/rspec.rb
retest-1.11.0 lib/retest/command/rspec.rb
retest-1.10.0 lib/retest/command/rspec.rb
retest-1.9.0 lib/retest/command/rspec.rb
retest-1.8.0 lib/retest/command/rspec.rb
retest-1.7.0 lib/retest/command/rspec.rb
retest-1.6.2 lib/retest/command/rspec.rb
retest-1.6.1 lib/retest/command/rspec.rb
retest-1.6.0 lib/retest/command/rspec.rb
retest-1.5.0 lib/retest/command/rspec.rb