Sha256: 0c7a1ee003b23cc19b2f09edd82d1f24fbd202ea1404f6347ab6d1ec787449b9
Contents?: true
Size: 711 Bytes
Versions: 3
Compression:
Stored size: 711 Bytes
Contents
require 'katapult/support/binary_util' describe Katapult::BinaryUtil do describe '#git_commit' do it 'adds all files before committing' do allow(Katapult::BinaryUtil).to receive(:system).with(/git add --all; git commit/) Katapult::BinaryUtil.git_commit 'test' end it 'sets "katapult" as commit author' do allow(Katapult::BinaryUtil).to receive(:system).with(/git commit.*--author='katapult \<katapult@makandra\.com\>'/) Katapult::BinaryUtil.git_commit 'test' end it 'sanitizes the commit message' do allow(Katapult::BinaryUtil).to receive(:system).with(/git commit -m '"hack0r"'/) Katapult::BinaryUtil.git_commit "\"hack''''0r\"" end end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
katapult-0.5.0 | spec/util_spec.rb |
katapult-0.4.1 | spec/util_spec.rb |
katapult-0.4.0 | spec/util_spec.rb |