티스토리 뷰
다음과 같이 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
댓글