Skip to content
This repository has been archived by the owner on Nov 11, 2017. It is now read-only.

Commit

Permalink
File.read must perform in the test app directory
Browse files Browse the repository at this point in the history
  • Loading branch information
sikachu committed Feb 11, 2012
1 parent 2dc7427 commit 6481f8f
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 6 deletions.
8 changes: 5 additions & 3 deletions features/integration_testing.feature
Expand Up @@ -150,9 +150,11 @@ Feature: integration testing
end
When /^I comment out gem "([^"]*)" from my Gemfile$/ do |gem_name|
content = File.read('Gemfile')
File.open('Gemfile', 'w') do |f|
f.write content.sub(/gem ['"]#{gem_name}/, '#\1')
in_current_dir do
content = File.read('Gemfile')
File.open('Gemfile', 'w') do |f|
f.write content.sub(/gem ['"]#{gem_name}/, '#\1')
end
end
end
"""
Expand Down
8 changes: 5 additions & 3 deletions features/step_definitions/diesel_steps.rb
Expand Up @@ -16,8 +16,10 @@
end

When /^I comment out gem "([^"]*)" from my Gemfile$/ do |gem_name|
content = File.read('Gemfile')
File.open('Gemfile', 'w') do |f|
f.write content.sub(/gem ['"]#{gem_name}/, '#\1')
in_current_dir do
content = File.read('Gemfile')
File.open('Gemfile', 'w') do |f|
f.write content.sub(/gem ['"]#{gem_name}/, '#\1')
end
end
end

0 comments on commit 6481f8f

Please sign in to comment.