Sha256: a70d357d97a2548524208907b8c2ca0b564da26911a4139c663d923cd5004c24

Contents?: true

Size: 1.36 KB

Versions: 15

Compression:

Stored size: 1.36 KB

Contents

Before('@gen') do
  `mv #{Rails.root}/features/ #{Rails.root}/features.orig/ > /dev/null 2>&1`
end

After('@gen') do
  `rm -rf #{Rails.root}/features`
  `mv #{Rails.root}/features.orig/ #{Rails.root}/features/ > /dev/null 2>&1`
end

Given(/^cucumber has been freshly generated$/) do
  `cd #{Rails.root}; script/generate cucumber -f --webrat`
end

Given(/^pickle path email has been freshly generated$/) do
  `cd #{Rails.root}; script/generate -f pickle paths email`
end

Given(/^env\.rb already requires (.+)$/) do |file|
  File.open("#{Rails.root}/features/support/env.rb", "a") do |env|
    env << "require '#{file}'\n"
  end
end

When(/^I run "(.*)"$/) do |command|
  @output = `cd #{Rails.root}; #{command}`
end

Then(/^I should see "(.*)"$/) do |text|
  @output.should include(text)
end

Then(/^the file (.+?) should exist$/) do |file|
  File.exist?("#{Rails.root}/#{file}").should == true
end

Then(/^the file (.+?) should match \/(.*?)\/$/) do |file, regexp|
  File.read("#{Rails.root}/#{file}").should match(/#{regexp}/m)
end

Then(/^the file (.+?) should not match \/(.*?)\/$/) do |file, regexp|
  File.read("#{Rails.root}/#{file}").should_not match(/#{regexp}/m)
end

Then /^the file ([^ ]+) should be identical to the local (.+)$/ do |generated_file, source_file|
  File.read("#{Rails.root}/#{generated_file}").should == File.read("#{File.dirname(__FILE__)}/../#{source_file}")
end

Version data entries

15 entries across 15 versions & 3 rubygems

Version Path
pickle-0.4.4 features/step_definitions/generator_steps.rb
judit-pickle-0.4.2 features/step_definitions/generator_steps.rb
pickle-0.4.3 features/step_definitions/generator_steps.rb
pickle-has_many_support-0.4.2 features/step_definitions/generator_steps.rb
pickle-0.4.2 features/step_definitions/generator_steps.rb
pickle-0.4.1 features/step_definitions/generator_steps.rb
pickle-0.4.0 features/step_definitions/generator_steps.rb
pickle-0.3.5 features/step_definitions/generator_steps.rb
pickle-0.3.4 features/step_definitions/generator_steps.rb
pickle-0.3.3 features/step_definitions/generator_steps.rb
pickle-0.3.2 features/step_definitions/generator_steps.rb
pickle-0.3.1 features/step_definitions/generator_steps.rb
pickle-has_many_support-0.3.1 features/step_definitions/generator_steps.rb
pickle-0.3.0 features/step_definitions/generator_steps.rb
pickle-0.2.12 features/step_definitions/generator_steps.rb