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
12 13 14 15 16 17 |
# File 'lib/rspec/rails/example/view_example_group.rb', line 12 def _default_helper base = [:example_group][:description].split('/')[0..-2].join('/') (base.camelize + 'Helper').constantize if base rescue NameError nil end |
#_default_helpers ⇒ Object
19 20 21 22 23 |
# File 'lib/rspec/rails/example/view_example_group.rb', line 19 def _default_helpers helpers = [_default_helper].compact helpers << ApplicationHelper if Object.const_defined?('ApplicationHelper') helpers end |