Commit 0d642e1e authored by yisiliang's avatar yisiliang Committed by Sean McGivern

to avoid “NoMethodError (undefined method `split' for nil:NilClass)” while safe_message is nil.

parent f5e6c447
......@@ -225,6 +225,11 @@ eos
end
describe 'description' do
it "returns no_commit_message when safe_message is blank" do
allow(commit).to receive(:safe_message).and_return('')
expect(commit.description).to eq("--no commit message")
end
it 'returns description of commit message if title less than 100 characters' do
message = <<eos
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec sodales id felis id blandit.
......
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