Sha256: b7c50523cab26557f4b3e0511b682b6eea7d37f34df8794731ce3fdd657a34af

Contents?: true

Size: 529 Bytes

Versions: 22

Compression:

Stored size: 529 Bytes

Contents

# frozen_string_literal: true

require 'minitest/autorun'
require 'phocus'
require 'jsonpath'

class TestJsonpathBin < MiniTest::Unit::TestCase
  def setup
    @runner = 'ruby -Ilib bin/jsonpath'
    @original_dir = Dir.pwd
    Dir.chdir(File.join(File.dirname(__FILE__), '..'))
  end

  def teardown
    Dir.chdir(@original_dir)
    `rm /tmp/test.json`
  end

  def test_stdin
    File.open('/tmp/test.json', 'w') { |f| f << '{"test": "time"}' }
    assert_equal '["time"]', `#{@runner} '$.test' /tmp/test.json`.strip
  end
end

Version data entries

22 entries across 22 versions & 2 rubygems

Version Path
iso-jsonpath-1.1.7 test/test_jsonpath_bin.rb
iso-jsonpath-1.1.6 test/test_jsonpath_bin.rb
jsonpath-1.1.5 test/test_jsonpath_bin.rb
jsonpath-1.1.4 test/test_jsonpath_bin.rb
jsonpath-1.1.3 test/test_jsonpath_bin.rb
jsonpath-1.1.2 test/test_jsonpath_bin.rb
jsonpath-1.1.0 test/test_jsonpath_bin.rb
jsonpath-1.0.7 test/test_jsonpath_bin.rb
jsonpath-1.0.6 test/test_jsonpath_bin.rb
jsonpath-1.0.5 test/test_jsonpath_bin.rb
jsonpath-1.0.4 test/test_jsonpath_bin.rb
jsonpath-1.0.3 test/test_jsonpath_bin.rb
jsonpath-1.0.2 test/test_jsonpath_bin.rb
jsonpath-1.0.1 test/test_jsonpath_bin.rb
jsonpath-1.0.0 test/test_jsonpath_bin.rb
jsonpath-0.9.9 test/test_jsonpath_bin.rb
jsonpath-0.9.8 test/test_jsonpath_bin.rb
jsonpath-0.9.7 test/test_jsonpath_bin.rb
jsonpath-0.9.6 test/test_jsonpath_bin.rb
jsonpath-0.9.5 test/test_jsonpath_bin.rb