Skip to content

Commit

Permalink
Avoid warning
Browse files Browse the repository at this point in the history
  • Loading branch information
cavalle committed Nov 21, 2010
1 parent 0267a63 commit f95cb1c
Showing 1 changed file with 3 additions and 9 deletions.
12 changes: 3 additions & 9 deletions spec/acceptance/rspec-2/acceptance_helper.rb
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -57,16 +57,10 @@ def run(cmd)
end end
end end


def run_spec(file_path, app_base=nil) def run_spec(file_path, app_base=Dir.pwd)
if app_base Dir.chdir app_base do
current_dir = Dir.pwd run("rspec #{file_path}")
Dir.chdir app_base
end end

output = run("rspec #{file_path}")

Dir.chdir current_dir if app_base
output
end end
end end


Expand Down

0 comments on commit f95cb1c

Please sign in to comment.