Sha256: 9aaeb30f8ecd390217d5d95bb6d81edef052088504bdeb8587ec93e32bc51196

Contents?: true

Size: 1.13 KB

Versions: 3

Compression:

Stored size: 1.13 KB

Contents

Given /^a Rails app$/ do
  FileUtils.chdir(@tmp_root) do
    `rails my_project`
  end
  @active_project_folder = File.expand_path(File.join(@tmp_root, "my_project"))
end

Given /^I copy the project generators into "([^\"]*)"$/ do |target_folder|
  in_project_folder do
    FileUtils.mkdir_p(target_folder)
  end
  `cp -rf #{File.dirname(__FILE__) + "/../../rails_generators/*"} #{File.join(@active_project_folder, target_folder)}`
end

When /^I add a feature file to test Rails index.html default file$/ do
  sample_feature = File.expand_path(File.dirname(__FILE__) + "/../fixtures/sample_feature")
  in_project_folder do
    `cp -rf #{sample_feature} features/sample.feature`
  end
end

Given /^I run the rails server in environment "([^\"]*)"$/ do |environment|
  in_project_folder do
    $rails_server ||= IO.popen("script/server -e #{environment} -p 3001", 'r+')
    File.open("tmp/culerity_rails_server.pid", "w") { |file| file << $rails_server.pid; file.flush }
  end
end

After do
  in_project_folder do
    Given 'I invoke task "rake culerity:rails:stop"'
  end
end

# rake culerity:rails:start [RAILS=culerity_development]
# rake culerity:rails:stop

Version data entries

3 entries across 3 versions & 2 rubygems

Version Path
drnic-culerity-0.2.1 features/step_definitions/rails_setup_steps.rb
drnic-culerity-0.2.2 features/step_definitions/rails_setup_steps.rb
langalex-culerity-0.2.2 features/step_definitions/rails_setup_steps.rb