Skip to content

The build fails. #1

@pvalena

Description

@pvalena

Failures:

  1) Cucumber::Messages omits empty string fields in output
     Failure/Error: expect(json).to eq("{\"source\":{}}\n")

       expected: "{\"source\":{}}\n"
            got: "{\"source\":{\"data\":\"\"}}\n"

       (compared using ==)

       Diff:
       @@ -1,2 +1,2 @@
       -{"source":{}}
       +{"source":{"data":""}}
     # ./spec/cucumber/messages/ndjson_serialization_spec.rb:22:in `block (2 levels) in <module:Messages>'

  2) Cucumber::Messages omits empty number fields in output
     Failure/Error: expect(json).to eq('{"testCaseStarted":{"timestamp":{}}}' + "\n")

       expected: "{\"testCaseStarted\":{\"timestamp\":{}}}\n"
            got: "{\"test_case_started\":{\"timestamp\":{\"seconds\":0}}}\n"

       (compared using ==)

       Diff:
       @@ -1,2 +1,2 @@
       -{"testCaseStarted":{"timestamp":{}}}
       +{"test_case_started":{"timestamp":{"seconds":0}}}
     # ./spec/cucumber/messages/ndjson_serialization_spec.rb:39:in `block (2 levels) in <module:Messages>'

  3) Cucumber::Messages omits empty repeated fields in output
     Failure/Error: expect(json).to eq('{"parameterType":{}}' + "\n")

       expected: "{\"parameterType\":{}}\n"
            got: "{\"parameter_type\":{}}\n"

       (compared using ==)

       Diff:
       @@ -1,2 +1,2 @@
       -{"parameterType":{}}
       +{"parameter_type":{}}
     # ./spec/cucumber/messages/ndjson_serialization_spec.rb:54:in `block (2 levels) in <module:Messages>'

  4) Cucumber::Messages can be serialised over an ndjson stream
     Failure/Error: raise "Not JSON: #{line.strip}"

     RuntimeError:
       Not JSON: {"source":{"data":"Feature: Hello"}}
     # ./lib/cucumber/messages/ndjson_to_message_enumerator.rb:13:in `rescue in block (2 levels) in initialize'
     # ./lib/cucumber/messages/ndjson_to_message_enumerator.rb:10:in `block (2 levels) in initialize'
     # ./lib/cucumber/messages/ndjson_to_message_enumerator.rb:8:in `each_line'
     # ./lib/cucumber/messages/ndjson_to_message_enumerator.rb:8:in `block in initialize'
     # ./spec/cucumber/messages/ndjson_serialization_spec.rb:69:in `each'
     # ./spec/cucumber/messages/ndjson_serialization_spec.rb:69:in `each'
     # ./spec/cucumber/messages/ndjson_serialization_spec.rb:69:in `to_a'
     # ./spec/cucumber/messages/ndjson_serialization_spec.rb:69:in `block (2 levels) in <module:Messages>'
     # ------------------
     # --- Caused by: ---
     # NoMethodError:
     #   undefined method `from_json' for Cucumber::Messages::Envelope:Class
     #   Did you mean?  to_json
     #   ./lib/cucumber/messages/ndjson_to_message_enumerator.rb:11:in `block (2 levels) in initialize'

  5) Cucumber::Messages ignores empty lines
     Failure/Error: raise "Not JSON: #{line.strip}"

     RuntimeError:
       Not JSON: {"source":{"data":"Feature: Hello"}}
     # ./lib/cucumber/messages/ndjson_to_message_enumerator.rb:13:in `rescue in block (2 levels) in initialize'
     # ./lib/cucumber/messages/ndjson_to_message_enumerator.rb:10:in `block (2 levels) in initialize'
     # ./lib/cucumber/messages/ndjson_to_message_enumerator.rb:8:in `each_line'
     # ./lib/cucumber/messages/ndjson_to_message_enumerator.rb:8:in `block in initialize'
     # ./spec/cucumber/messages/ndjson_serialization_spec.rb:85:in `each'
     # ./spec/cucumber/messages/ndjson_serialization_spec.rb:85:in `each'
     # ./spec/cucumber/messages/ndjson_serialization_spec.rb:85:in `to_a'
     # ./spec/cucumber/messages/ndjson_serialization_spec.rb:85:in `block (2 levels) in <module:Messages>'
     # ------------------
     # --- Caused by: ---
     # NoMethodError:
     #   undefined method `from_json' for Cucumber::Messages::Envelope:Class
     #   Did you mean?  to_json
     #   ./lib/cucumber/messages/ndjson_to_message_enumerator.rb:11:in `block (2 levels) in initialize'

  6) Cucumber::Messages ignores missing fields
     Failure/Error: raise "Not JSON: #{line.strip}"

     RuntimeError:
       Not JSON: {"unused": 99}
     # ./lib/cucumber/messages/ndjson_to_message_enumerator.rb:13:in `rescue in block (2 levels) in initialize'
     # ./lib/cucumber/messages/ndjson_to_message_enumerator.rb:10:in `block (2 levels) in initialize'
     # ./lib/cucumber/messages/ndjson_to_message_enumerator.rb:8:in `each_line'
     # ./lib/cucumber/messages/ndjson_to_message_enumerator.rb:8:in `block in initialize'
     # ./spec/cucumber/messages/ndjson_serialization_spec.rb:95:in `each'
     # ./spec/cucumber/messages/ndjson_serialization_spec.rb:95:in `each'
     # ./spec/cucumber/messages/ndjson_serialization_spec.rb:95:in `to_a'
     # ./spec/cucumber/messages/ndjson_serialization_spec.rb:95:in `block (2 levels) in <module:Messages>'
     # ------------------
     # --- Caused by: ---
     # NoMethodError:
     #   undefined method `from_json' for Cucumber::Messages::Envelope:Class
     #   Did you mean?  to_json
     #   ./lib/cucumber/messages/ndjson_to_message_enumerator.rb:11:in `block (2 levels) in initialize'

Finished in 0.01757 seconds (files took 0.32449 seconds to load)
16 examples, 6 failures

https://copr.fedorainfracloud.org/coprs/build/2063172

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions