Sha256: ed814b93a50ddb83a36ff143e37b5ca43dc5a590dd5f7c3f7ee98e193187b450

Contents?: true

Size: 694 Bytes

Versions: 8

Compression:

Stored size: 694 Bytes

Contents

module Knapsack
  module Runners
    class RSpecRunner
      def self.run(args)
        allocator = Knapsack::AllocatorBuilder.new(Knapsack::Adapters::RSpecAdapter).allocator

        Knapsack.logger.info
        Knapsack.logger.info 'Report specs:'
        Knapsack.logger.info allocator.report_node_tests
        Knapsack.logger.info
        Knapsack.logger.info 'Leftover specs:'
        Knapsack.logger.info allocator.leftover_node_tests
        Knapsack.logger.info

        cmd = %Q[bundle exec rspec #{args} --default-path #{allocator.test_dir} -- #{allocator.stringify_node_tests}]

        system(cmd)
        exit($?.exitstatus) unless $?.exitstatus.zero?
      end
    end
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
knapsack-1.13.0 lib/knapsack/runners/rspec_runner.rb
knapsack-1.12.2 lib/knapsack/runners/rspec_runner.rb
knapsack-1.12.1 lib/knapsack/runners/rspec_runner.rb
knapsack-1.12.0 lib/knapsack/runners/rspec_runner.rb
knapsack-1.11.1 lib/knapsack/runners/rspec_runner.rb
knapsack-1.11.0 lib/knapsack/runners/rspec_runner.rb
knapsack-1.10.0 lib/knapsack/runners/rspec_runner.rb
knapsack-1.9.0 lib/knapsack/runners/rspec_runner.rb