Module: RSpec::Rails::FeatureExampleGroup
Relationships & Source Files | |
Super Chains via Extension / Inclusion / Inheritance | |
Class Chain:
self,
MinitestAssertionAdapter::ClassMethods ,
SetupAndTeardownAdapter::ClassMethods ,
ActiveSupport::Concern
|
|
Instance Chain:
self,
RailsExampleGroup ,
ActiveSupport::ExecutionContext::TestHelper,
ActiveSupport::CurrentAttributes::TestHelper,
TaggedLoggingAdapter ,
FixtureSupport::Fixtures ,
FixtureSupport ,
ActiveRecord::TestFixtures,
MinitestAssertionAdapter ,
MinitestLifecycleAdapter ,
SetupAndTeardownAdapter
|
|
Defined in: | rspec-rails/lib/rspec/rails/example/feature_example_group.rb |
Overview
Container module for routing spec functionality.
Constant Summary
-
DEFAULT_HOST =
Default host to be used in
::RSpec::Rails
route helpers if none is specified."www.example.com"
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
FixtureSupport
- Included
#run_in_transaction? | Monkey patched to avoid collisions with ‘let(:name)’ since |
Instance Method Summary
-
#visit
Shim to check for presence of Capybara.
TaggedLoggingAdapter
- Included
#tagged_logger | Vendored from activesupport/lib/active_support/testing/tagged_logging.rb This implements the tagged_logger method where it is expected, but doesn’t call |
MinitestAssertionAdapter
- Included
MinitestLifecycleAdapter
- Included
SetupAndTeardownAdapter
- Included
DSL Calls
included
[ GitHub ]12 13 14 15 16 17 18 19 20 21 22
# File 'rspec-rails/lib/rspec/rails/example/feature_example_group.rb', line 12
included do app = ::Rails.application if app.respond_to?(:routes) include app.routes.url_helpers if app.routes.respond_to?(:url_helpers) include app.routes.mounted_helpers if app.routes.respond_to?(:mounted_helpers) if respond_to?(: ) [:host] ||= ::RSpec::Rails::FeatureExampleGroup::DEFAULT_HOST end end end
Instance Method Details
#visit
Shim to check for presence of Capybara. Will delegate if present, raise if not. We assume here that in most cases visit
will be the first Capybara method called in a spec.
# File 'rspec-rails/lib/rspec/rails/example/feature_example_group.rb', line 27
def visit(*) if defined?(super) super else raise "Capybara not loaded, please add it to your Gemfile:\n\ngem \"capybara\"" end end