Sha256: cb1ce1a8c30c4e4cd510febea3293f0934dc01ed3f7710f3f045f17e72f3fadf
Contents?: true
Size: 498 Bytes
Versions: 16
Compression:
Stored size: 498 Bytes
Contents
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
16 entries across 16 versions & 1 rubygems