Sha256: d8c87559e679e9b564da5818ea2278c3d87bdc5bc5d16d84c225e1be242c5e10

Contents?: true

Size: 897 Bytes

Versions: 5

Compression:

Stored size: 897 Bytes

Contents

Given 'I have a clean environment' do
  # Make sure to have a non-bundled ENV, even when running via "bundle exec cucumber ..."
  ENV["RUBYOPT"] = nil
  ENV["BUNDLE_GEMFILE"] = nil
end

When 'I run the rake task "$task_name"' do |task_name|
  Dir.chdir('test_project') do
    system("bundle exec rake #{task_name}")
  end
end

When 'I generate "$generator_with_args"' do |generator_with_args|
  Dir.chdir('test_project') do
    system("rails generate #{generator_with_args}")
  end
end

When 'I create a file named "$filename" with:' do |filename, content|
  File.open("test_project/#{filename}", "w") do |file|
    file.write(content)
  end
end

Then 'I see a successful response in the shell' do
  $?.to_i.should == 0
end

When 'I drop and create the required databases' do
  Dir.chdir('test_project') do
    system("bundle exec rake db:drop")
    system("bundle exec rake db:create")
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
da-suspenders-1.3.1 features/step_definitions/shell.rb
da-suspenders-1.3.0 features/step_definitions/shell.rb
da-suspenders-1.2.5 features/step_definitions/shell.rb
da-suspenders-1.2.4 features/step_definitions/shell.rb
da-suspenders-1.2.3 features/step_definitions/shell.rb