Skip to content

Commit 0715750

Browse files
committed
Test the whole contents of CLI::Commands::Run#outputs.
1 parent 83b2f61 commit 0715750

File tree

1 file changed

+11
-3
lines changed

1 file changed

+11
-3
lines changed

spec/cli/commands/run_spec.rb

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -147,9 +147,11 @@
147147
end
148148

149149
it "must set the :output_format option using the path's file extension" do
150-
expect(subject.outputs.size).to eq(1)
151-
expect(subject.outputs[0][0]).to eq(path)
152-
expect(subject.outputs[0][1]).to be(Ronin::Core::OutputFormats::JSON)
150+
expect(subject.outputs).to eq(
151+
[
152+
[path, Ronin::Core::OutputFormats::JSON]
153+
]
154+
)
153155
end
154156

155157
context "but the '--output-format' has already been specified" do
@@ -158,6 +160,12 @@
158160

159161
it "must not override the already set :output_format" do
160162
expect(subject.options[:output_format]).to be(Ronin::Core::OutputFormats::NDJSON)
163+
164+
expect(subject.outputs).to eq(
165+
[
166+
[path, Ronin::Core::OutputFormats::NDJSON]
167+
]
168+
)
161169
end
162170
end
163171
end

0 commit comments

Comments
 (0)