티스토리 뷰

다음과 같이 Rspec.configure 블록으로 래핑 해보십시오.

RSpec.configure do |config|
  config.after { |example_group| save_and_open_page if example_group.example.exception }
  end
  
-------------------

@ejosafat-추가 "예". 당신의 대답에서 나는 그것을 다음과 같이 사용했습니다.

RSpec.configure do |config|
  config.after { |example_group| save_and_open_page if example_group.exception }
  end
  
-------------------

gem이 있습니다. 이것을 Gemfile에 추가하기 만하면됩니다.

gem 'capybara-screenshot', :group => :test

모든 지침은 여기에서 찾을 수 있습니다 : -https : //github.com/mattheworiordan/capybara-screenshot



출처
https://stackoverflow.com/questions/39917156
댓글
공지사항
Total
Today
Yesterday
«   2025/08   »
1 2
3 4 5 6 7 8 9
10 11 12 13 14 15 16
17 18 19 20 21 22 23
24 25 26 27 28 29 30
31