Sha256: 99104cc574ba6118f9fd19bddb07befc4e33a5fcaf08afa2061444905ba6a800

Contents?: true

Size: 991 Bytes

Versions: 3

Compression:

Stored size: 991 Bytes

Contents

$: << File.join(File.dirname(__FILE__), "/../lib" )

# Set the default environment to sqlite3's in_memory database
ENV['RAILS_ENV'] ||= 'in_memory'

# Load the Rails environment and testing framework
require "#{File.dirname(__FILE__)}/app_root/config/environment"
require "#{File.dirname(__FILE__)}/../lib/cucumber_factory"
require 'spec/rails'

# Undo changes to RAILS_ENV
silence_warnings {RAILS_ENV = ENV['RAILS_ENV']}

# Run the migrations
ActiveRecord::Migrator.migrate("#{Rails.root}/db/migrate")

Spec::Runner.configure do |config|
  config.use_transactional_fixtures = true
  config.use_instantiated_fixtures  = false
end

def prepare_cucumber_example
  @step_mother = Cucumber::StepMother.new
  language = @step_mother.load_programming_language('rb')
  scenario = stub('scenario', :language => 'en')
  language.send(:begin_scenario, scenario)
  @world = language.current_world
  @main = Object.new
  @main.extend(Cucumber::RbSupport::RbDsl)
  Cucumber::Factory.add_steps(@main)
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
cucumber_factory-1.7.1 spec/spec_helper.rb
cucumber_factory-1.7.0 spec/spec_helper.rb
cucumber_factory-1.6.0 spec/spec_helper.rb