I have been following TDD for a new project and am loving it so far. All of my tests pass locally. However, I am trying to use CircleCI and am having problems getting my tests to run there. From my research and the error messages I have seen so far I think I have something wrong with my Rspec setup that is causing trouble with CircleCI. I am not quite sure how to troubleshoot this. My app is Rails 4.2 and Ruby 2.2. If you have any advice or suggestions I appreciate it.
require "webmock/rspec" require "capybara/rspec" require "capybara/rails" # http://rubydoc.info/gems/rspec-core/RSpec/Core/Configuration RSpec.configure do |config| config.include Rails.application.routes.url_helpers config.expect_with :rspec do |expectations| expectations.syntax = :expect end config.mock_with :rspec do |mocks| mocks.syntax = :expect end config.order = :random end WebMock.disable_net_connect!(allow_localhost: true)
The primary error I have been getting is (there is a long trace that followed):
bundle exec rspec --color --require spec_helper spec --format progress /home/ubuntu/burger-club/vendor/bundle/ruby/2.2.0/gems/capybara- 2.4.4/lib/capybara/rails.rb:6:in `block (2 levels) in <top (required)>': uninitialized constant Rails (NameError)