Skip to content

Commit 9a4ec46

Browse files
author
Kevin Paulisse
committed
Finish coverage and documentation of diff API object
1 parent 286d218 commit 9a4ec46

1 file changed

Lines changed: 20 additions & 0 deletions

File tree

spec/octocatalog-diff/tests/api/v1/diff_spec.rb

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -285,4 +285,24 @@
285285
end
286286
end
287287
end
288+
289+
describe '#inspect' do
290+
it 'should return a string' do
291+
testobj = described_class.new(chg_2)
292+
expect(testobj.inspect).to be_a_kind_of(String)
293+
end
294+
end
295+
296+
describe '#to_s' do
297+
it 'should return a string' do
298+
testobj = described_class.new(chg_2)
299+
expect(testobj.to_s).to be_a_kind_of(String)
300+
end
301+
end
302+
303+
describe '#initialize' do
304+
it 'should raise ArgumentError if called with a non-array' do
305+
expect { described_class.new('foo') }.to raise_error(ArgumentError)
306+
end
307+
end
288308
end

0 commit comments

Comments
 (0)