tkymtk's blog

Ruby on Rails及びその周辺について調べたこと。Do whatever you want to do at your own pace.

2013-12-13から1日間の記事一覧

RSpec: カスタムマッチャ Rails Tutorialでハマったところ。should_notの動作

問題 should_notが期待通りに動作しない カスタムマッチャの定義 RSpec::Matchers.define :have_error_message do |message| match do |page| expect(page).to have_selector('div.alert.alert-error', text: message) end

間違いがあれば、ご指摘下さると幸いです。