Sha256: bf901368cc47addb4198dc1170087fa118e7e58de9ff90f63fda6361beacf25b

Contents?: true

Size: 665 Bytes

Versions: 9

Compression:

Stored size: 665 Bytes

Contents

require 'spec_helper'
require 'schematron'

describe "validate executable" do
  
  it "should take only a schema and an instance document" do
    `ruby -Ilib bin/stron theschema`.should =~ /Usage: /
  end
  
  it "should validate a good instance doc" do
    schema = 'spec/schema/fda_sip.sch'
    instance = 'spec/instances/daitss-sip/Example1.xml'
    `ruby -Ilib bin/stron #{schema} #{instance}`.should be_empty
  end
  
  it "should print errors to standard out" do
    schema = 'spec/schema/fda_sip.sch'
    instance = 'spec/instances/daitss-sip/Example2.xml'
    `ruby -Ilib bin/stron #{schema} #{instance}`.should =~ /^element "file" on line 48/
  end
  
end

Version data entries

9 entries across 9 versions & 2 rubygems

Version Path
flazz-schematron-0.0.3 spec/command_spec.rb
flazz-schematron-0.1.0 spec/command_spec.rb
schematron-1.1.1 spec/command_spec.rb
schematron-1.0.0 spec/command_spec.rb
schematron-0.1.2 spec/command_spec.rb
schematron-0.1.1 spec/command_spec.rb
schematron-0.1.0 spec/command_spec.rb
schematron-0.0.2 spec/command_spec.rb
schematron-0.0.3 spec/command_spec.rb