Module: RSpec::Rails
- Defined in:
- lib/rspec-rails.rb,
lib/rspec/rails/version.rb,
lib/rspec/rails/adapters.rb,
lib/rspec/rails/matchers.rb,
lib/rspec/rails/view_assigns.rb,
lib/rspec/rails/configuration.rb,
lib/rspec/rails/view_rendering.rb,
lib/rspec/rails/fixture_support.rb,
lib/rspec/rails/example/view_example_group.rb,
lib/rspec/rails/example/model_example_group.rb,
lib/rspec/rails/example/rails_example_group.rb,
lib/rspec/rails/example/helper_example_group.rb,
lib/rspec/rails/example/mailer_example_group.rb,
lib/rspec/rails/example/mailer_example_group.rb,
lib/rspec/rails/example/feature_example_group.rb,
lib/rspec/rails/example/request_example_group.rb,
lib/rspec/rails/example/routing_example_group.rb,
lib/rspec/rails/example/controller_example_group.rb
Overview
Namespace for rspec-rails code.
Defined Under Namespace
Modules: ControllerExampleGroup, FeatureExampleGroup, HelperExampleGroup, MailerExampleGroup, Matchers, ModelExampleGroup, RailsExampleGroup, RequestExampleGroup, RoutingExampleGroup, Version, ViewAssigns, ViewExampleGroup, ViewRendering Classes: Configuration, Railtie
Constant Summary collapse
- Assertions =
Constant aliased to either Minitest or TestUnit, depending on what is loaded.
Test::Unit::Assertions
- DIRECTORY_MAPPINGS =
This constant is part of a private API. You should avoid using this constant if possible, as it may be removed or be changed in the future.
Mappings used by
infer_spec_type_from_file_location!
. { :controller => %w[spec controllers], :helper => %w[spec helpers], :mailer => %w[spec mailers], :model => %w[spec models], :request => %w[spec (requests|integration|api)], :routing => %w[spec routing], :view => %w[spec views], :feature => %w[spec features] }
Instance Method Summary collapse
-
#infer_spec_type_from_file_location! ⇒ Object
Automatically tag specs in conventional directories with matching
type
metadata so that they have relevant helpers available to them. -
#render_views(val) ⇒ Object
Enables view rendering for controllers specs.
-
#render_views=(val) ⇒ Object
When set to
true
, controller specs will render the relevant view as well. -
#render_views? ⇒ Object
Reader for currently value of
render_views
setting.
Instance Method Details
#infer_spec_type_from_file_location! ⇒ Object
Automatically tag specs in conventional directories with matching type
metadata so that they have relevant helpers available to them. See
RSpec::Rails::DIRECTORY_MAPPINGS
for details on which metadata is
applied to each directory.
|
# File 'lib/rspec/rails/configuration.rb', line 7
|
#render_views(val) ⇒ Object
Enables view rendering for controllers specs.
|
# File 'lib/rspec/rails/configuration.rb', line 18
|
#render_views=(val) ⇒ Object
When set to true
, controller specs will render the relevant view as
well. Defaults to false
.
|
# File 'lib/rspec/rails/configuration.rb', line 13
|
#render_views? ⇒ Object
Reader for currently value of render_views
setting.
|
# File 'lib/rspec/rails/configuration.rb', line 21
|