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