Sha256: 5cefe572338af648a5a13ca605da3a713680ed4221d95bd4bc95c32fcd7993fe

Contents?: true

Size: 725 Bytes

Versions: 2

Compression:

Stored size: 725 Bytes

Contents

begin
  # Try to load it so we can assign @_result below if needed.
  require 'test/unit/testresult'
rescue LoadError => ignore
end

module Cucumber #:nodoc:
  module Rails #:nodoc:
    class World < ActionDispatch::IntegrationTest #:nodoc:
      include Rack::Test::Methods
      include ActiveSupport::Testing::SetupAndTeardown if ActiveSupport::Testing.const_defined?("SetupAndTeardown")

      def initialize #:nodoc:
        @_result = Test::Unit::TestResult.new if defined?(Test::Unit::TestResult)
      end

      if !defined?(ActiveRecord::Base)
        def self.fixture_table_names; []; end # Workaround for projects that don't use ActiveRecord
      end
    end
  end
end

World do
  Cucumber::Rails::World.new
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
cucumber-rails-1.4.0 lib/cucumber/rails/world.rb
cucumber-rails-1.3.1 lib/cucumber/rails/world.rb