Sha256: ff58d6653c1c423e43a5de450a7ca1565360ecda368e1ef570c33be1647cd859
Contents?: true
Size: 1.06 KB
Versions: 3
Compression:
Stored size: 1.06 KB
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 @runtime = Cucumber::Runtime.new language = @runtime.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 def invoke_cucumber_step(step) @runtime.step_match(step).invoke(nil) # nil means no multiline args end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
cucumber_factory-1.7.4 | spec/spec_helper.rb |
cucumber_factory-1.7.3 | spec/spec_helper.rb |
cucumber_factory-1.7.2 | spec/spec_helper.rb |