lib/cucumber/formatter/json.rb in cucumber-5.3.0 vs lib/cucumber/formatter/json.rb in cucumber-6.0.0
- old
+ new
@@ -92,13 +92,10 @@
def attach(src, mime_type)
if mime_type == 'text/x.cucumber.log+plain'
test_step_output << src
return
end
- if File.file?(src)
- content = File.open(src, 'rb', &:read)
- data = encode64(content)
- elsif mime_type =~ /;base64$/
+ if mime_type =~ /;base64$/
mime_type = mime_type[0..-8]
data = src
else
data = encode64(src)
end