My功能的文件是这样的:水豚:: ExpectationNotMet
Scenario: I am on dashboard area
Given I am on dashboard
Then I should see link 'All Cases'
When I click on 'All Cases'
Then I should see be redirected to case index page
我的步骤定义文件是这样的:
Given(/^I am on dashboard$/) do
visit dashboard_path
end
Then(/^I should see link 'All Cases'$/) do
page.should have_content('All Cases')
end
对于我收到错误的情况:(RSpec的期望::: :ExpectationNotMetError)
所有案例只是侧边栏中的链接。
可有一个人请我提出关于这个错误...尝试了很多,但它不工作...
如果您给出完整的错误(例如,不清楚测试失败的位置),这将有所帮助。 –