Module: RSpec::Rails::FixtureSupport Private
Do not use. This module is for internal use only.
Relationships & Source Files | |
Namespace Children | |
Modules:
| |
Extension / Inclusion / Inheritance Descendants | |
Included In:
| |
Super Chains via Extension / Inclusion / Inheritance | |
Class Chain:
self,
MinitestAssertionAdapter::ClassMethods ,
SetupAndTeardownAdapter::ClassMethods ,
ActiveSupport::Concern
|
|
Instance Chain:
self,
ActiveRecord::TestFixtures,
MinitestAssertionAdapter ,
MinitestLifecycleAdapter ,
SetupAndTeardownAdapter
|
|
Defined in: | rspec-rails/lib/rspec/rails/fixture_support.rb |
Class Method Summary
MinitestAssertionAdapter::ClassMethods
- Extended
assertion_method_names | Returns the names of assertion methods that we want to expose to examples without exposing non-assertion methods in Test::Unit or Minitest. |
define_assertion_delegators |
SetupAndTeardownAdapter::ClassMethods
- Extended
Instance Attribute Summary
-
#run_in_transaction? ⇒ Boolean
readonly
Monkey patched to avoid collisions with ‘let(:name)’ since
::RSpec::Rails
6.1.
Instance Method Summary
MinitestAssertionAdapter
- Included
MinitestLifecycleAdapter
- Included
SetupAndTeardownAdapter
- Included
DSL Calls
included
[ GitHub ]19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35
# File 'rspec-rails/lib/rspec/rails/fixture_support.rb', line 19
included do if RSpec.configuration.use_active_record? include Fixtures # TestFixtures#fixture_path is deprecated and will be removed in Rails 7.2 if respond_to?(:fixture_paths=) self.fixture_paths = RSpec.configuration.fixture_paths else self.fixture_path = RSpec.configuration.fixture_path end self.use_transactional_tests = 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
Instance Attribute Details
#run_in_transaction? ⇒ Boolean
(readonly)
Monkey patched to avoid collisions with ‘let(:name)’ since ::RSpec::Rails
6.1
# File 'rspec-rails/lib/rspec/rails/fixture_support.rb', line 14
def run_in_transaction? current_example_name = (RSpec.current_example && RSpec.current_example. [:description]) use_transactional_tests && !self.class.uses_transaction?(current_example_name) end