Sha256: 6c688b5f3c2ee1e0b41522373d7f426f94f8b8248f66cf1f487cecab50e5a665

Contents?: true

Size: 429 Bytes

Versions: 1

Compression:

Stored size: 429 Bytes

Contents

module Retest
  class Command
    Rake = Struct.new(:all, :bin_file) do
      def self.command(all:, bin_file: File.exist?('bin/rake'))
        new(all, bin_file).command
      end

      def command
        return "#{root_command} TEST=<test>" unless all
        root_command
      end

      private

      def root_command
        return 'bin/rake test' if bin_file

        'bundle exec rake test'
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
retest-1.1.0 lib/retest/command/rake.rb