Sha256: 0609d918428de7ba11e505f97a9c06ec5cd682c930550d9cfe20899a6c3a7d35

Contents?: true

Size: 831 Bytes

Versions: 65

Compression:

Stored size: 831 Bytes

Contents

class FeatureRunner
  attr_accessor :orm
  attr_accessor :another_orm
  attr_accessor :multiple_databases
  attr_accessor :strategy
  attr_accessor :exit_status
  attr_accessor :output

  def strategy
    @strategy || 'truncation'
  end

  def go(feature)
    full_dir ||= File.expand_path(File.dirname(__FILE__) + "/../../examples/")
    Dir.chdir(full_dir) do


      ENV['ORM']          = orm
      ENV['STRATEGY']     = strategy

      if another_orm
       ENV['ANOTHER_ORM']  = another_orm
      else
        ENV['ANOTHER_ORM'] = nil
      end

      if multiple_databases
        ENV['MULTIPLE_DBS'] = "true"
      else
        ENV['MULTIPLE_DBS'] = nil
      end

      self.output = `#{"jruby -S " if defined?(JRUBY_VERSION)}cucumber features/#{feature}.feature`

      self.exit_status = $?.exitstatus
    end
  end

end

Version data entries

65 entries across 54 versions & 8 rubygems

Version Path
apl-library-0.0.90 vendor/bundle/ruby/2.1.0/gems/database_cleaner-1.2.0/features/support/feature_runner.rb
apl-library-0.0.90 vendor/bundle/ruby/2.1.0/gems/apl-library-0.0.90/vendor/bundle/ruby/2.1.0/gems/database_cleaner-1.2.0/features/support/feature_runner.rb
apl-library-0.0.90 vendor/bundle/ruby/2.1.0/gems/apl-library-0.0.90/vendor/bundle/ruby/1.9.1/gems/database_cleaner-1.2.0/features/support/feature_runner.rb
apl-library-0.0.90 vendor/bundle/ruby/2.1.0/gems/apl-library-0.0.90/vendor/bundle/ruby/1.8/gems/database_cleaner-1.2.0/features/support/feature_runner.rb
apl-library-0.0.90 vendor/bundle/ruby/1.8/gems/database_cleaner-1.2.0/features/support/feature_runner.rb
raffle_v1-0.0.5 lib/database_cleaner-0.7.2/features/support/feature_runner.rb
database_cleaner-1.3.0 features/support/feature_runner.rb
database_cleaner-1.2.0 features/support/feature_runner.rb
database_cleaner-1.1.1 features/support/feature_runner.rb
database_cleaner-1.1.0 features/support/feature_runner.rb
database_cleaner-1.0.1 features/support/feature_runner.rb
database_cleaner-1.0.0.RC1 features/support/feature_runner.rb
sunrise-cms-0.5.0.rc1 vendor/bundle/ruby/1.9.1/gems/database_cleaner-0.9.1/features/support/feature_runner.rb
database_cleaner-0.9.1 features/support/feature_runner.rb
sunrise-cms-0.3.3 vendor/bundle/ruby/1.9.1/gems/rails-uploader-0.0.1/vendor/bundle/ruby/1.9.1/gems/database_cleaner-0.7.2/features/support/feature_runner.rb
sunrise-cms-0.3.3 vendor/bundle/ruby/1.9.1/gems/database_cleaner-0.7.2/features/support/feature_runner.rb
sunrise-cms-0.3.2 vendor/bundle/ruby/1.9.1/gems/rails-uploader-0.0.1/vendor/bundle/ruby/1.9.1/gems/database_cleaner-0.7.2/features/support/feature_runner.rb
sunrise-cms-0.3.2 vendor/bundle/ruby/1.9.1/gems/database_cleaner-0.7.2/features/support/feature_runner.rb
sunrise-cms-0.3.1 vendor/bundle/ruby/1.9.1/gems/database_cleaner-0.7.2/features/support/feature_runner.rb
sunrise-cms-0.3.1 vendor/bundle/ruby/1.9.1/gems/rails-uploader-0.0.1/vendor/bundle/ruby/1.9.1/gems/database_cleaner-0.7.2/features/support/feature_runner.rb