We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 340ab71 commit 8dabc51Copy full SHA for 8dabc51
1 file changed
spec/cli_spec.rb
@@ -180,6 +180,15 @@
180
RDF::CLI.exec(["serialize", TEST_FILES[:nt]], output_format: :nquads)
181
}.to write.to(:output)
182
end
183
+
184
+ it "passes parsed prefixes to writer" do
185
+ allow_any_instance_of(RDF::NTriples::Reader).to receive(:prefixes).and_return(foo: :bar)
186
187
+ writer_mock = double("writer")
188
+ expect(RDF::Writer).to receive(:for).and_return(writer_mock)
189
+ expect(writer_mock).to receive(:new).with(anything, hash_including(prefixes: {foo: :bar}))
190
+ RDF::CLI.exec(["serialize", TEST_FILES[:nt]], output_format: :nquads)
191
+ end
192
193
194
it "help" do
0 commit comments