|
67 | 67 | end |
68 | 68 | end |
69 | 69 |
|
70 | | - describe ".cli_commands", skip: ("TextMate OptionParser issues" if ENV['TM_SELECTED_FILE']) do |
| 70 | + describe ".cli_commands" do |
71 | 71 | require 'rdf/cli' |
72 | 72 | let(:ttl) {File.expand_path("../test-files/test-1-rdf.ttl", __FILE__)} |
73 | 73 | let(:json) {File.expand_path("../test-files/test-1-input.json", __FILE__)} |
74 | 74 | let(:context) {File.expand_path("../test-files/test-1-context.json", __FILE__)} |
75 | 75 |
|
76 | 76 | describe "#expand" do |
77 | 77 | it "expands RDF" do |
78 | | - expect {RDF::CLI.exec(["expand", ttl], format: :ttl)}.to write.to(:output) |
| 78 | + expect {RDF::CLI.exec(["expand", ttl], format: :ttl, output_format: :jsonld)}.to write.to(:output) |
79 | 79 | end |
80 | 80 | it "expands JSON" do |
81 | | - expect {RDF::CLI.exec(["expand", json], format: :jsonld, validate: false)}.to write.to(:output) |
| 81 | + expect {RDF::CLI.exec(["expand", json], format: :jsonld, output_format: :jsonld, validate: false)}.to write.to(:output) |
82 | 82 | end |
83 | 83 | end |
84 | 84 |
|
85 | 85 | describe "#compact" do |
86 | 86 | it "compacts RDF" do |
87 | | - expect {RDF::CLI.exec(["compact", ttl], context: context, format: :ttl, validate: false)}.to write.to(:output) |
| 87 | + expect {RDF::CLI.exec(["compact", ttl], context: context, format: :ttl, output_format: :jsonld, validate: false)}.to write.to(:output) |
88 | 88 | end |
89 | 89 | it "compacts JSON" do |
90 | | - expect {RDF::CLI.exec(["compact", json], context: context, format: :jsonld, validate: false)}.to write.to(:output) |
| 90 | + expect {RDF::CLI.exec(["compact", json], context: context, format: :jsonld, output_format: :jsonld, validate: false)}.to write.to(:output) |
91 | 91 | end |
92 | 92 | end |
93 | 93 |
|
94 | 94 | describe "#flatten" do |
95 | 95 | it "flattens RDF" do |
96 | | - expect {RDF::CLI.exec(["flatten", ttl], context: context, format: :ttl, validate: false)}.to write.to(:output) |
| 96 | + expect {RDF::CLI.exec(["flatten", ttl], context: context, format: :ttl, output_format: :jsonld, validate: false)}.to write.to(:output) |
97 | 97 | end |
98 | 98 | it "flattens JSON" do |
99 | | - expect {RDF::CLI.exec(["flatten", json], context: context, format: :jsonld, validate: false)}.to write.to(:output) |
| 99 | + expect {RDF::CLI.exec(["flatten", json], context: context, format: :jsonld, output_format: :jsonld, validate: false)}.to write.to(:output) |
100 | 100 | end |
101 | 101 | end |
102 | 102 |
|
103 | 103 | describe "#frame" do |
104 | 104 | it "frames RDF" do |
105 | | - expect {RDF::CLI.exec(["frame", ttl], frame: context, format: :ttl)}.to write.to(:output) |
| 105 | + expect {RDF::CLI.exec(["frame", ttl], frame: context, format: :ttl, output_format: :jsonld)}.to write.to(:output) |
106 | 106 | end |
107 | 107 | it "frames JSON" do |
108 | | - expect {RDF::CLI.exec(["frame", json], frame: context, format: :jsonld, validate: false)}.to write.to(:output) |
| 108 | + expect {RDF::CLI.exec(["frame", json], frame: context, format: :jsonld, output_format: :jsonld, validate: false)}.to write.to(:output) |
109 | 109 | end |
110 | 110 | end |
111 | 111 | end |
|
0 commit comments