0

I'm trying to setup/run rspec tests on my rails app but keep getting this error:

Missing helper file helpers//users/myname/desktop/the_odin_project/myapp/app/helpers/application_helper.rb_helper.rb (AbstractController::Helpers::MissingHelperError)

I've been try all day to figure this out, but to no avail. Most responses say that it is a misplaced capital letter somewhere in your path, but that has not worked. I can't figure out why it won't work.

spec_helper.rb

require "capybara/rspec"
# This file was generated by the `rails generate rspec:install` command. Conventionally, all
# specs live under a `spec` directory, which RSpec adds to the `$LOAD_PATH`.

# See http://rubydoc.info/gems/rspec-core/RSpec/Core/Configuration
RSpec.configure do |config|
 # rspec-expectations config goes here. You can use an alternate
 # assertion/expectation library such as wrong or the stdlib/minitest
 # assertions if you prefer.
 config.expect_with :rspec do |expectations|
# This option will default to `true` in RSpec 4. It makes the `description`
# and `failure_message` of custom matchers include text for helper methods
# defined using `chain`, e.g.:
#     be_bigger_than(2).and_smaller_than(4).description
#     # => "be bigger than 2 and smaller than 4"
# ...rather than:
#     # => "be bigger than 2"
expectations.include_chain_clauses_in_custom_matcher_descriptions = true
end

 # rspec-mocks config goes here. You can use an alternate test double
 # library (such as bogus or mocha) by changing the `mock_with` option here.
config.mock_with :rspec do |mocks|
  # Prevents you from mocking or stubbing a method that does not exist on
  # a real object. This is generally recommended, and will default to
  # `true` in RSpec 4.
 mocks.verify_partial_doubles = true
end

# This option will default to `:apply_to_host_groups` in RSpec 4 (and will
# have no way to turn it off -- the option exists only for backwards
# compatibility in RSpec 3). It causes shared context metadata to be
# inherited by the metadata hash of host groups and examples, rather than
# triggering implicit auto-inclusion in groups with matching metadata.
config.shared_context_metadata_behavior = :apply_to_host_groups
 end
Harry B.
  • 411
  • 1
  • 4
  • 21
  • please post your spec_helper file. – Todd Resudek Oct 16 '16 at 00:13
  • posted the spec_helper file – Harry B. Oct 16 '16 at 00:19
  • 1
    ok, that looks fine. This part: `/application_helper.rb_helper.rb` makes me think there is an include somewhere that is written wrong. If you have a rails_helper.rb file, check that. But it could be in literally any file in your env. – Todd Resudek Oct 16 '16 at 00:49
  • possible duplicate http://stackoverflow.com/questions/27871726/strange-error-in-rails-missing-helper/27966165#27966165 – ole Oct 16 '16 at 08:15

0 Answers0