【Rspec】Capybara::Ambiguous: Ambiguous match, found 2 elements matching visible link
Rspec中にタイトルのようなエラーが出た場合,match: :first
で解決する
実例
it "説明ページに遷移" do click_link "お絵かきBOXとは",match: :first expect(current_path).to eq pages_about_path end
一画面にお絵かきBOXとは
というリンクボタンが2つある状況だったんですが解決しました。