From c5bb9265dc8668b252e6c5e289ea9ba9fa1923c7 Mon Sep 17 00:00:00 2001 From: Juan Pablo Rinaldi Date: Sun, 3 May 2020 20:19:27 -0300 Subject: [PATCH] Fix have_text description --- lib/capybara/rspec/matchers/have_text.rb | 2 +- spec/rspec/shared_spec_matchers.rb | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/capybara/rspec/matchers/have_text.rb b/lib/capybara/rspec/matchers/have_text.rb index 2bfd6311..f17f2459 100644 --- a/lib/capybara/rspec/matchers/have_text.rb +++ b/lib/capybara/rspec/matchers/have_text.rb @@ -15,7 +15,7 @@ module Capybara end def description - "text #{format(text)}" + "have text #{format(text)}" end def format(content) diff --git a/spec/rspec/shared_spec_matchers.rb b/spec/rspec/shared_spec_matchers.rb index 9021699d..57c5924c 100644 --- a/spec/rspec/shared_spec_matchers.rb +++ b/spec/rspec/shared_spec_matchers.rb @@ -265,7 +265,7 @@ RSpec.shared_examples Capybara::RSpecMatchers do |session, _mode| describe 'have_content matcher' do it 'gives proper description' do - expect(have_content('Text').description).to eq('text "Text"') + expect(have_content('Text').description).to eq('have text "Text"') end context 'on a string' do @@ -369,7 +369,7 @@ RSpec.shared_examples Capybara::RSpecMatchers do |session, _mode| describe 'have_text matcher' do it 'gives proper description' do - expect(have_text('Text').description).to eq('text "Text"') + expect(have_text('Text').description).to eq('have text "Text"') end context 'on a string' do