Sha256: e7c8208534ab4bbdfd8479bbe15cc9cd9f32d7c52e5963c6929faae1ad12a62b

Contents?: true

Size: 1.32 KB

Versions: 18

Compression:

Stored size: 1.32 KB

Contents

module RSpec
  module Rails
    # @private
    module FixtureSupport
      if defined?(ActiveRecord::TestFixtures)
        extend ActiveSupport::Concern
        include RSpec::Rails::SetupAndTeardownAdapter
        include RSpec::Rails::MinitestLifecycleAdapter if ::ActiveRecord::VERSION::STRING > '4'
        include RSpec::Rails::MinitestAssertionAdapter
        include ActiveRecord::TestFixtures

        included do
          # TODO: (DC 2011-06-25) this is necessary because fixture_file_upload
          # accesses fixture_path directly on ActiveSupport::TestCase. This is
          # fixed in rails by https://github.com/rails/rails/pull/1861, which
          # should be part of the 3.1 release, at which point we can include
          # these lines for rails < 3.1.
          ActiveSupport::TestCase.class_exec do
            include ActiveRecord::TestFixtures
            self.fixture_path = RSpec.configuration.fixture_path
          end
          # /TODO

          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

Version data entries

18 entries across 17 versions & 4 rubygems

Version Path
ish_lib_manager-0.0.1 test/dummy/vendor/bundle/ruby/2.3.0/gems/rspec-rails-3.4.2/lib/rspec/rails/fixture_support.rb
rspec-rails-3.4.2 lib/rspec/rails/fixture_support.rb
rspec-rails-3.4.1 lib/rspec/rails/fixture_support.rb
rspec-rails-3.4.0 lib/rspec/rails/fixture_support.rb
sc_core-0.0.7 test/dummy/vendor/bundle/ruby/2.2.0/gems/rspec-rails-3.3.3/lib/rspec/rails/fixture_support.rb
solidus_backend-1.0.0.pre3 vendor/bundle/gems/rspec-rails-3.3.2/lib/rspec/rails/fixture_support.rb
solidus_backend-1.0.0.pre2 vendor/bundle/gems/rspec-rails-3.3.2/lib/rspec/rails/fixture_support.rb
rspec-rails-3.3.3 lib/rspec/rails/fixture_support.rb
solidus_backend-1.0.0.pre vendor/bundle/gems/rspec-rails-3.1.0/lib/rspec/rails/fixture_support.rb
solidus_backend-1.0.0.pre vendor/bundle/gems/rspec-rails-3.3.2/lib/rspec/rails/fixture_support.rb
rspec-rails-3.3.2 lib/rspec/rails/fixture_support.rb
rspec-rails-3.3.1 lib/rspec/rails/fixture_support.rb
rspec-rails-3.3.0 lib/rspec/rails/fixture_support.rb
rspec-rails-3.2.3 lib/rspec/rails/fixture_support.rb
rspec-rails-3.2.2 lib/rspec/rails/fixture_support.rb
rspec-rails-3.2.1 lib/rspec/rails/fixture_support.rb
rspec-rails-3.2.0 lib/rspec/rails/fixture_support.rb
rspec-rails-3.1.0 lib/rspec/rails/fixture_support.rb