Module: RSpec::Rails::FeatureCheck Private

Defined in:
lib/rspec/rails/feature_check.rb

Overview

This module is part of a private API. You should avoid using this module if possible, as it may be removed or be changed in the future.

Disable some cops until https://github.com/bbatsov/rubocop/issues/1310 rubocop:disable Style/IndentationConsistency

Class Method Summary (collapse)

Class Method Details

+ (Boolean) can_check_pending_migrations?

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

rubocop:enable Style/IndentationWidth

Returns:

  • (Boolean)
11
12
13
14
# File 'lib/rspec/rails/feature_check.rb', line 11
def can_check_pending_migrations?
  has_active_record_migration? &&
    ::ActiveRecord::Migration.respond_to?(:check_pending!)
end

+ (Boolean) can_maintain_test_schema?

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Returns:

  • (Boolean)
16
17
18
19
# File 'lib/rspec/rails/feature_check.rb', line 16
def can_maintain_test_schema?
  has_active_record_migration? &&
    ::ActiveRecord::Migration.respond_to?(:maintain_test_schema!)
end

+ (Boolean) has_active_job?

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Returns:

  • (Boolean)
21
22
23
# File 'lib/rspec/rails/feature_check.rb', line 21
def has_active_job?
  defined?(::ActiveJob)
end

+ (Boolean) has_active_record?

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Returns:

  • (Boolean)
25
26
27
# File 'lib/rspec/rails/feature_check.rb', line 25
def has_active_record?
  defined?(::ActiveRecord)
end

+ (Boolean) has_active_record_migration?

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Returns:

  • (Boolean)
29
30
31
# File 'lib/rspec/rails/feature_check.rb', line 29
def has_active_record_migration?
  has_active_record? && defined?(::ActiveRecord::Migration)
end