0
我正在为列出的宝石编写我的应用程序测试。我找不到如何设置水豚与骨干工作(在所有AJAX)
例如测试:测试rspec&capybara的测试导轨+主干应用程序
require 'spec_helper' describe "Main" do describe "GET /" do
it "displays articles" do
Article.create!(title:'title',body:'<p>body text</p>')
visit '/'
page.should have_content('body text')
end
end
end
输出:
Failures:
1) Main GET/displays articles
Failure/Error: page.should have_content('body text')
expected there to be text "body text" in "Loading..."
# ./spec/features/main_spec.rb:8:in `block (3 levels) in <top (required)>'
“载入中...”是在我看来模板前阿贾克斯文字...
的一点是,我不希望在目前使用的茉莉花为这个应用程序
这http://www.opinionatedprogrammer.com/2011/02/capybara-and- selenium-with-rspec-and-rails-3 /可以帮助你 – Sakeer 2015-07-08 08:47:53