Commit 5f9b3ea7 authored by Peter Leitzen's avatar Peter Leitzen

Fix kwargs deprecation warnings in git diff specs

This commit fixes warnings like:

Passing the keyword argument as the last hash parameter is deprecated
parent e9c2fc48
......@@ -301,19 +301,19 @@ EOT
describe '#too_large?' do
it 'returns true for a diff that is too large' do
diff = described_class.new(diff: 'a' * 204800)
diff = described_class.new({ diff: 'a' * 204800 })
expect(diff.too_large?).to eq(true)
end
it 'returns false for a diff that is small enough' do
diff = described_class.new(diff: 'a')
diff = described_class.new({ diff: 'a' })
expect(diff.too_large?).to eq(false)
end
it 'returns true for a diff that was explicitly marked as being too large' do
diff = described_class.new(diff: 'a')
diff = described_class.new({ diff: 'a' })
diff.too_large!
......@@ -323,19 +323,19 @@ EOT
describe '#collapsed?' do
it 'returns false by default even on quite big diff' do
diff = described_class.new(diff: 'a' * 20480)
diff = described_class.new({ diff: 'a' * 20480 })
expect(diff).not_to be_collapsed
end
it 'returns false by default for a diff that is small enough' do
diff = described_class.new(diff: 'a')
diff = described_class.new({ diff: 'a' })
expect(diff).not_to be_collapsed
end
it 'returns true for a diff that was explicitly marked as being collapsed' do
diff = described_class.new(diff: 'a')
diff = described_class.new({ diff: 'a' })
diff.collapse!
......@@ -359,7 +359,7 @@ EOT
describe '#collapse!' do
it 'prunes the diff' do
diff = described_class.new(diff: "foo\nbar")
diff = described_class.new({ diff: "foo\nbar" })
diff.collapse!
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment