mirror of
https://github.com/teamcapybara/capybara.git
synced 2022-11-09 12:08:07 -05:00
Minor test improvements
This commit is contained in:
parent
eb8fe55b99
commit
7e2d19bde1
3 changed files with 5 additions and 5 deletions
|
@ -44,7 +44,7 @@ RSpec.describe Capybara::Selector::RegexpDisassembler, :aggregate_failures do
|
|||
/abc?def?g/ => %w[ab de g],
|
||||
/d?/ => []
|
||||
}.each do |regexp, expected|
|
||||
expect(Capybara::Selector::RegexpDisassembler.new(regexp).substrings).to eq expected
|
||||
expect(described_class.new(regexp).substrings).to eq expected
|
||||
end
|
||||
end
|
||||
|
||||
|
@ -131,7 +131,7 @@ RSpec.describe Capybara::Selector::RegexpDisassembler, :aggregate_failures do
|
|||
/ab(cd|cd)?ef/ => %w[ab ef],
|
||||
/ab\\?cd/ => %w[ab cd]
|
||||
}.each do |regexp, expected|
|
||||
expect(Capybara::Selector::RegexpDisassembler.new(regexp).substrings).to eq expected
|
||||
expect(described_class.new(regexp).substrings).to eq expected
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
@ -682,12 +682,12 @@ RSpec.shared_examples Capybara::RSpecMatchers do |session, _mode|
|
|||
end
|
||||
|
||||
it 'treats a given value as a string' do
|
||||
class Foo
|
||||
foo = Class.new do
|
||||
def to_s
|
||||
'some value'
|
||||
end
|
||||
end
|
||||
expect(html).to have_field('Text field', with: Foo.new)
|
||||
expect(html).to have_field('Text field', with: foo.new)
|
||||
end
|
||||
|
||||
it 'supports compounding' do
|
||||
|
|
|
@ -76,7 +76,7 @@ RSpec.describe 'capybara/rspec' do
|
|||
context 'Type: Other', type: :other do
|
||||
context 'when RSpec::Matchers is included after Capybara::DSL' do
|
||||
let(:test_class_instance) do
|
||||
class DSLMatchersTest
|
||||
Class.new do
|
||||
include Capybara::DSL
|
||||
include RSpec::Matchers
|
||||
end.new
|
||||
|
|
Loading…
Reference in a new issue