Sha256: 1cd79bf4ace472244553ecc4eaf04f37fe8f387dca6dde8dd8730fe8d9397771

Contents?: true

Size: 770 Bytes

Versions: 14

Compression:

Stored size: 770 Bytes

Contents

require 'json'
require 'cucumber/messages'

module Cucumber
  module Messages
    describe 'messages acdeptance tests' do
      # TODO: Remove '/minimal' from the glob
      Dir["#{File.dirname(__FILE__)}/../../../../../compatibility-kit/javascript/features/**/*.ndjson"].each do |ndjson_file|
        it "deserialises and serialises messages in #{ndjson_file}" do
          File.open(ndjson_file, 'r:utf-8') do |io|
            io.each_line do |json|
              check(json)
            end
          end
        end
      end

      def check(json)
        hash = JSON.parse(json)
        envelope = Envelope.from_json(json)
        new_json = envelope.to_json
        new_hash = JSON.parse(new_json)
        expect(new_hash).to eq(hash)
      end
    end
  end
end

Version data entries

14 entries across 14 versions & 3 rubygems

Version Path
rubypitaya-3.12.5 ./lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/cucumber-messages-18.0.0/spec/cucumber/messages/acceptance_spec.rb
rubypitaya-3.12.4 ./lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/cucumber-messages-18.0.0/spec/cucumber/messages/acceptance_spec.rb
rubypitaya-3.12.3 ./lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/cucumber-messages-18.0.0/spec/cucumber/messages/acceptance_spec.rb
rubypitaya-3.12.2 ./lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/cucumber-messages-18.0.0/spec/cucumber/messages/acceptance_spec.rb
cucumber-messages-19.1.2 spec/cucumber/messages/acceptance_spec.rb
cucumber-messages-19.1.1 spec/cucumber/messages/acceptance_spec.rb
cucumber-messages-19.1.0 spec/cucumber/messages/acceptance_spec.rb
cucumber-messages-19.0.0 spec/cucumber/messages/acceptance_spec.rb
cucumber-messages-18.0.0 spec/cucumber/messages/acceptance_spec.rb
phillipug-foodie-0.1.0 .vendor/ruby/3.0.0/gems/cucumber-messages-17.1.1/spec/cucumber/messages/acceptance_spec.rb
cucumber-messages-17.1.1 spec/cucumber/messages/acceptance_spec.rb
cucumber-messages-17.1.0 spec/cucumber/messages/acceptance_spec.rb
cucumber-messages-17.0.1 spec/cucumber/messages/acceptance_spec.rb
cucumber-messages-17.0.0 spec/cucumber/messages/acceptance_spec.rb