I just started playing with Capycabra+poltergeist and after execution of my Capy test rspec ./spec/features/test_spec.rb
I got the following error:
Failure/Error: visit '/item/new'
ArgumentError: rack-test requires a rack application, but none was given
Also I have a few standard rspec tests and whenever I try to excute all tests, rspec tests are passed successfully, but only the capy test fails with weird error
ActionView::Template::Error: couldn't find file 'jquery.min' (in app/assets/javascripts/application.js:13)
Which leads me to the confusion.
I have viewed several similar threads on stackoverflow in some cases the error is about missing config.include Capybara::DSL in the spec_helper.rb or incorrect location of tests. I made appropriate changes, but it doesn't work, the error is still the same.
My spec_helper.rb file
require 'capybara'
require 'capybara/dsl'
require 'capybara/poltergeist'
Capybara.javascript_driver = :poltergeist
RSpec.configure do |config|
config.include Capybara::DSL
end
Full Version of spec_helper: http://pastebin.com/qkANfu39
Test file:
#spec/features/test_spec.rb
require 'spec_helper'
describe 'accessibility of webpage' do
it 'should access web page' do
visit '/item/new'
expect(page).to have_content("Something")
end
end
Thoughts?