Module: RSpec::Rails::HelperExampleGroup

Extended by:
ActiveSupport::Concern
Includes:
ActionView::TestCase::Behavior, RailsExampleGroup, ViewAssigns
Defined in:
lib/rspec/rails/example/helper_example_group.rb

Defined Under Namespace

Modules: ClassMethods

Instance Method Summary (collapse)

Methods included from ViewAssigns

#_assigns, #assign, #view_assigns

Methods included from Matchers

#be_a_new, #be_new_record, #be_valid

Methods included from MinitestLifecycleAdapter

#after_setup, #after_teardown, #before_setup, #before_teardown

Methods included from SetupAndTeardownAdapter

#method_name

Instance Method Details

- (Object) helper

Returns an instance of ActionView::Base with the helper being specified mixed in, along with any of the built-in rails helpers.

19
20
21
22
23
24
# File 'lib/rspec/rails/example/helper_example_group.rb', line 19
def helper
  _view.tap do |v|
    v.extend(ApplicationHelper) if defined?(ApplicationHelper)
    v.assign(view_assigns)
  end
end