Module: RSpec::Rails::ViewExampleGroup::ClassMethods
- Defined in:
- lib/rspec/rails/example/view_example_group.rb
Instance Method Summary collapse
Instance Method Details
#_default_helper ⇒ Object
35 36 37 38 39 40 |
# File 'lib/rspec/rails/example/view_example_group.rb', line 35 def _default_helper base = [:example_group][:description].split('/').first (base.camelize + 'Helper').constantize if base rescue NameError nil end |
#_default_helpers ⇒ Object
42 43 44 45 46 |
# File 'lib/rspec/rails/example/view_example_group.rb', line 42 def _default_helpers helpers = [_default_helper].compact helpers << ApplicationHelper if Object.const_defined?('ApplicationHelper') helpers end |