lib/cucumber/formatter/json.rb in cucumber-3.1.2 vs lib/cucumber/formatter/json.rb in cucumber-3.2.0

- old
+ new

@@ -80,10 +80,16 @@ def puts(message) test_step_output << message end def embed(src, mime_type, _label) - if File.file?(src) + begin + is_file = File.file?(src) + rescue ArgumentError + is_file = false + end + + if is_file content = File.open(src, 'rb', &:read) data = encode64(content) else if mime_type =~ /;base64$/ mime_type = mime_type[0..-8]