Skip to content

Commit 2658226

Browse files
committed
Fix CLI spec.
1 parent 8b05a0d commit 2658226

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

spec/format_spec.rb

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -67,45 +67,45 @@
6767
end
6868
end
6969

70-
describe ".cli_commands", skip: ("TextMate OptionParser issues" if ENV['TM_SELECTED_FILE']) do
70+
describe ".cli_commands" do
7171
require 'rdf/cli'
7272
let(:ttl) {File.expand_path("../test-files/test-1-rdf.ttl", __FILE__)}
7373
let(:json) {File.expand_path("../test-files/test-1-input.json", __FILE__)}
7474
let(:context) {File.expand_path("../test-files/test-1-context.json", __FILE__)}
7575

7676
describe "#expand" do
7777
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)
7979
end
8080
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)
8282
end
8383
end
8484

8585
describe "#compact" do
8686
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)
8888
end
8989
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)
9191
end
9292
end
9393

9494
describe "#flatten" do
9595
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)
9797
end
9898
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)
100100
end
101101
end
102102

103103
describe "#frame" do
104104
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)
106106
end
107107
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)
109109
end
110110
end
111111
end

0 commit comments

Comments
 (0)