Module: RSpec::Rails::HelperExampleGroup

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

Overview

Container module for helper specs.

Instance Method Summary (collapse)

Methods included from ViewAssigns

#assign, #view_assigns

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.

29
30
31
32
33
34
# File 'lib/rspec/rails/example/helper_example_group.rb', line 29
def helper
  _view.tap do |v|
    v.extend(ApplicationHelper) if defined?(ApplicationHelper)
    v.assign(view_assigns)
  end
end