Sha256: 31f8c863e9e7cf1cb607161a6e57d5a7caed63f2f1a4d62bfa3d73ec380db8a4

Contents?: true

Size: 1.05 KB

Versions: 1

Compression:

Stored size: 1.05 KB

Contents

module RSpec
  module Rails
    module FixtureSupport
      extend ActiveSupport::Concern

      include RSpec::Rails::SetupAndTeardownAdapter
      include RSpec::Rails::TestUnitAssertionAdapter

      included do
        if RSpec.configuration.use_transactional_fixtures
          # TODO - figure out how to move this outside the included block
          include ActiveRecord::TestFixtures

          self.fixture_path = RSpec.configuration.fixture_path
          self.use_transactional_fixtures = RSpec.configuration.use_transactional_fixtures
          self.use_instantiated_fixtures  = RSpec.configuration.use_instantiated_fixtures
          fixtures RSpec.configuration.global_fixtures if RSpec.configuration.global_fixtures
        end
      end
    end
  end
end

RSpec.configure do |c|
  c.include RSpec::Rails::FixtureSupport
  c.add_setting :use_transactional_fixtures
  c.add_setting :use_transactional_examples, :alias => :use_transactional_fixtures
  c.add_setting :use_instantiated_fixtures
  c.add_setting :global_fixtures
  c.add_setting :fixture_path
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
rspec-rails-2.0.0.beta.18 lib/rspec/rails/fixture_support.rb