Skip to content

Commit 1335aa9

Browse files
committedJan 10, 2022
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 bde12f2 commit 1335aa9

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

Lines changed: 1 addition & 0 deletions
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.