File: bin_test.rb

package info (click to toggle)
ruby-brandur-json-schema 0.21.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 436 kB
  • sloc: ruby: 4,081; makefile: 6
file content (19 lines) | stat: -rw-r--r-- 629 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
require "test_helper"

#
# The purpose of this sets of tests is just to test our Ruby executables
# where possible so that we can get very basic sanity checks on their syntax.
#
# We can do this without actually executing them with a "ruby -c" call.
#

describe "executables in bin/" do
  before do
    @bin_dir = File.expand_path("../../bin", __FILE__)
  end

  it "has roughly valid Ruby structure for validate-schema" do
    IO.popen(["ruby", "-c", File.join(@bin_dir, "validate-schema")]) { |io| io.read }
    assert_equal $?.exitstatus, 0, "Ruby syntax check failed; see error above"
  end unless ENV["AUTOPKGTEST_TMP"]
end