Skip to content

Commit

Permalink
Let the bacon task pass -I with the root directory
Browse files Browse the repository at this point in the history
  • Loading branch information
manveru committed Jun 30, 2009
1 parent 4747ef4 commit 158ae0f
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions tasks/bacon.rake
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,16 @@ task :bacon => :setup do
left_format = "%4d/%d: %-#{len + 11}s"
spec_format = "%d specifications (%d requirements), %d failures, %d errors"

load_path = File.expand_path('../../', __FILE__)

specs.each_with_index do |spec, idx|
print(left_format % [idx + 1, specs_size, spec])

Open3.popen3(RUBY, spec) do |sin, sout, serr|
Open3.popen3(RUBY, '-I', load_path, spec) do |sin, sout, serr|
out = sout.read.strip
err = serr.read.strip

# this is conventional, see spec/innate/state/fiber.rb for usage
# this is conventional
if out =~ /^Bacon::Error: (needed .*)/
puts(yellow % ("%6s %s" % ['', $1]))
else
Expand Down

0 comments on commit 158ae0f

Please sign in to comment.