Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit e46fc78

Browse files
committedDec 20, 2021
Fix system spec spec on Rails 7
ActionPack is checking `instance_created?` now, and it was `false`, so `take_screenshot` was not called. ``` def take_failed_screenshot take_screenshot if failed? && supports_screenshot? && Capybara::Session.instance_created? end ``` rails/rails@1dfcffb
1 parent b0dc2ea commit e46fc78

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed
 

‎spec/rspec/rails/example/system_example_group_spec.rb

+1
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,7 @@ module RSpec::Rails
7272

7373
describe '#after' do
7474
it 'sets the :extra_failure_lines metadata to an array of STDOUT lines' do
75+
allow(Capybara::Session).to receive(:instance_created?).and_return(true)
7576
group = RSpec::Core::ExampleGroup.describe do
7677
include SystemExampleGroup
7778

0 commit comments

Comments
 (0)
Please sign in to comment.