आरएसपीईसी और कैपिबरा के साथ एक नए रेल 3.2.9 ऐप पर काम करना।कैपेबरा अनुरोध चश्मे में क्यों उपलब्ध नहीं है?
मैं Gemfile में निम्नलिखित है:
gem 'rspec-rails'
gem 'capybara'
और कल्पना/spec_helper.rb में निम्नलिखित:
require 'rspec/rails'
require 'capybara/rspec'
और कल्पना/अनुरोध/asdf_spec.rb में:
require 'spec_helper'
describe 'Asdf' do
describe "GET /asdfs" do
it "should list asdfs" do
visit asdfs_path
end
end
end
यह परीक्षण विफल रहा है:
Failure/Error: visit asdfs_path
NoMethodError:
undefined method `visit' for #<RSpec::Core::ExampleGroup::Nested_1::Nested_2::Nested_1:0x007fa7b68961a0>
# ./spec/requests/asdfs_spec.rb:19:in `block (4 levels) in <top (required)>'
तो ऐसा लगता है कि कैपिबरा लोड नहीं हो रहा है। एक, क्यों नहीं? मुझे लगता है कि मैंने यह एक ही चीज़ पहले एक दर्जन बार किया है ... शायद बेवकूफ कुछ खाली हो रहा है।
क्या आप Capybara 2.0 का उपयोग कर रहे हैं? –
हाँ मैं था! मेरा google-search-fu कमजोर था। –