Skip to content
This repository has been archived by the owner on Dec 12, 2021. It is now read-only.

Using rails_app's Gemfile #130

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ require 'rake'
require 'cucumber'
require 'cucumber/rake/task'

include Rake::DSL

Cucumber::Rake::Task.new(:features) do |t|
t.cucumber_opts = "features --format progress"
end
Expand Down
6 changes: 4 additions & 2 deletions features/step_definitions/common_steps.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
When /^I run "([^\"]*)"$/ do |command|
system("cd #{@current_directory} && #{command}").should be_true
env_vars = command =~ /^rake/ ? "BUNDLE_GEMFILE=#{@current_directory}/Gemfile" : ''
system("cd #{@current_directory} && #{env_vars} #{command}").should be_true
end

When /^I add "([^\"]*)" to file "([^\"]*)"$/ do |content, short_path|
Expand Down Expand Up @@ -54,7 +55,8 @@
end

Then /^I should successfully run "([^\"]*)"$/ do |command|
system("cd #{@current_directory} && #{command}").should be_true
env_vars = command =~ /^rake/ ? "BUNDLE_GEMFILE=#{@current_directory}/Gemfile" : ''
system("cd #{@current_directory} && #{env_vars} #{command}").should be_true
end

Then /^I should see "([^\"]*)" when running "([^\"]*)"$/ do |expected_response, command|
Expand Down