Sha256: b245f77568becc8f0c109a56dd219a48ef0e90ac3d615f2393fbc717911a9896

Contents?: true

Size: 651 Bytes

Versions: 3

Compression:

Stored size: 651 Bytes

Contents

Given /^I am using (ActiveRecord|DataMapper|MongoMapper|CouchPotato)$/ do |orm|
  @orm = orm
end

Given /^the (.+) cleaning strategy$/ do |strategy|
  @strategy = strategy
end

When "I run my scenarios that rely on a clean database" do
  full_dir ||= File.expand_path(File.dirname(__FILE__) + "/../../examples/")
  Dir.chdir(full_dir) do
    ENV['ORM'] = @orm.downcase
    ENV['STRATEGY'] = @strategy
    @out = `#{"jruby -S " if defined?(JRUBY_VERSION)}cucumber features`
    @status = $?.exitstatus
  end
end

Then "I should see all green" do
  unless @status == 0
    raise "Expected to see all green but we saw FAIL! Output:\n#{@out}"
  end
end


Version data entries

3 entries across 3 versions & 3 rubygems

Version Path
jonrowe-database_cleaner-0.5.2 features/step_definitions/database_cleaner_steps.rb
saimonmoore-database_cleaner-0.5.0 features/step_definitions/database_cleaner_steps.rb
database_cleaner-0.5.0 features/step_definitions/database_cleaner_steps.rb