1
當使用rspec
我平時做這樣的事情:MINITEST +水豚怎麼辦save_and_open_page時出現錯誤
if ENV['OPEN_ERRORS']
shown_error_pages = 0
config.after :each do
if RSpec.current_example.exception != nil and shown_error_pages == 0
shown_error_pages += 1
save_and_open_page
end
end
end
例如OPEN_ERRORS=1 bundle exec rspec
我怎麼可以做這樣的事情與MINITEST?