Sha256: 9009084b6a6836afe078b22fbb8f1b7ef5661f3c9c096b4c56d6ab9290afc9d6

Contents?: true

Size: 661 Bytes

Versions: 9

Compression:

Stored size: 661 Bytes

Contents

require 'cerberus/builder/ruby_base'

class Cerberus::Builder::RSpec < Cerberus::Builder::RubyBase
  def initialize(config)
    super(config, "rspec", "spec")
  end

  def run
    @output = if @config[:builder, @name.to_sym, :task]
      `#{@config[:bin_path]}rake #{@config[:builder, @name.to_sym, :task]} 2>&1`
    else
      `#{@config[:bin_path]}rake #{choose_exec()} 2>&1`
    end
    successful?
  end

  def brokeness
    if @output =~ /\d+ examples, (\d+) failures?/
      $1.to_i
    end
  end

  def successful?
    $?.exitstatus == 0 and not @output.include?("#{@cmd} aborted!") and @output.include?("0 failures")
  end
end

Version data entries

9 entries across 9 versions & 2 rubygems

Version Path
cerberus-0.8.0 lib/cerberus/builder/rspec.rb
cerberus-0.7.9 lib/cerberus/builder/rspec.rb
edavis10-cerberus-0.7.8 lib/cerberus/builder/rspec.rb
cerberus-0.7.8 lib/cerberus/builder/rspec.rb
cerberus-0.7.7 lib/cerberus/builder/rspec.rb
cerberus-0.7.6 lib/cerberus/builder/rspec.rb
cerberus-0.7.2 lib/cerberus/builder/rspec.rb
cerberus-0.7.5 lib/cerberus/builder/rspec.rb
cerberus-0.7 lib/cerberus/builder/rspec.rb