Skip to content

Commit 13b1deb

Browse files
committed
Use Capybara has_title in matcher for async update
1 parent bfc07e1 commit 13b1deb

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

spec/matchers/be_pending_subscription_page.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,8 @@ class BePendingSubscriptionPage
2323
# matches? is a required method for RSpec matchers
2424
def matches?(actual_page)
2525
expected_title = "Check your inbox"
26-
if actual_page.has_no_title?(expected_title)
27-
self.failure_message = "\nexpected title: #{expected_title}\n got title: #{actual_page.title}\n"
26+
unless actual_page.has_title?(expected_title)
27+
self.failure_message = "\nexpected title: '#{expected_title}'\n got title: '#{actual_page.title}'\n"
2828
return false
2929
end
3030

0 commit comments

Comments
 (0)