123456789_123456789_123456789_123456789_123456789_

Module: RSpec::Rails::ViewExampleGroup::ClassMethods Private

Do not use. This module is for internal use only.
Relationships & Source Files
Defined in: rspec-rails/lib/rspec/rails/example/view_example_group.rb

Instance Method Summary

Instance Method Details

#_default_helper

[ GitHub ]

  
# File 'rspec-rails/lib/rspec/rails/example/view_example_group.rb', line 26

def _default_helper
  base = [:description].split('/')[0..-2].join('/')
  (base.camelize + 'Helper').constantize unless base.to_s.empty?
rescue NameError
  nil
end

#_default_helpers

[ GitHub ]

  
# File 'rspec-rails/lib/rspec/rails/example/view_example_group.rb', line 33

def _default_helpers
  helpers = [_default_helper].compact
  helpers << ApplicationHelper if Object.const_defined?('ApplicationHelper')
  helpers
end