Extract Kamal::Git as gateway for all git usage
This commit is contained in:
13
test/git_test.rb
Normal file
13
test/git_test.rb
Normal file
@@ -0,0 +1,13 @@
|
||||
require "test_helper"
|
||||
|
||||
class GitTest < ActiveSupport::TestCase
|
||||
test "uncommitted changes exist" do
|
||||
Kamal::Git.expects(:`).with("git status --porcelain").returns("M file\n")
|
||||
assert_equal "M file", Kamal::Git.uncommitted_changes
|
||||
end
|
||||
|
||||
test "uncommitted changes do not exist" do
|
||||
Kamal::Git.expects(:`).with("git status --porcelain").returns("")
|
||||
assert_equal "", Kamal::Git.uncommitted_changes
|
||||
end
|
||||
end
|
||||
Reference in New Issue
Block a user