test/unit/git_repo_tests.rb in ggem-1.9.1 vs test/unit/git_repo_tests.rb in ggem-1.9.2
- old
+ new
@@ -2,11 +2,10 @@
require "ggem/git_repo"
require "test/support/cmd_tests_helpers"
class GGem::GitRepo
-
class UnitTests < Assert::Context
desc "GGem::GitRepo"
setup do
@git_repo_class = GGem::GitRepo
end
@@ -14,11 +13,10 @@
should "know its exceptions" do
assert subject::NotFoundError < ArgumentError
assert subject::CmdError < RuntimeError
end
-
end
class InitTests < UnitTests
desc "when init"
setup do
@@ -34,35 +32,32 @@
should have_imeths :run_add_version_tag_cmd, :run_rm_tag_cmd
should "know its path" do
assert_equal @repo_path, subject.path
end
-
end
class CmdTests < InitTests
include GGem::CmdTestsHelpers
-
end
class RunInitCmdTests < CmdTests
desc "`run_init_cmd`"
setup do
@exp_cmds_run = [
"cd #{@repo_path} && git init",
- "cd #{@repo_path} && git add --all && git add -f *.gitkeep"
+ "cd #{@repo_path} && git add --all && git add -f *.keep"
]
end
should "run a system cmd to init the repo and add any existing files" do
assert_exp_cmds_run{ subject.run_init_cmd }
end
should "complain if any system cmds are not successful" do
assert_exp_cmds_error(CmdError){ subject.run_init_cmd }
end
-
end
class RunValidateCleanCmdTests < CmdTests
desc "`run_validate_clean_cmd`"
setup do
@@ -76,11 +71,10 @@
end
should "complain if any system cmds are not successful" do
assert_exp_cmds_error(CmdError){ subject.run_validate_clean_cmd }
end
-
end
class RunValidateCommittedCmdTests < CmdTests
desc "`run_validate_committed_cmd`"
setup do
@@ -94,11 +88,10 @@
end
should "complain if any system cmds are not successful" do
assert_exp_cmds_error(CmdError){ subject.run_validate_committed_cmd }
end
-
end
class RunPushCmdTests < CmdTests
desc "`run_push_cmd`"
setup do
@@ -113,11 +106,10 @@
end
should "complain if any system cmds are not successful" do
assert_exp_cmds_error(CmdError){ subject.run_push_cmd }
end
-
end
class RunAddVersionTagCmdTests < CmdTests
desc "`run_add_version_tag_cmd`"
setup do
@@ -134,11 +126,10 @@
end
should "complain if any system cmds are not successful" do
assert_exp_cmds_error(CmdError){ subject.run_add_version_tag_cmd(@version, @tag) }
end
-
end
class RunRmTagCmdTests < CmdTests
desc "`run_rm_tag_cmd`"
setup do
@@ -154,9 +145,7 @@
end
should "complain if any system cmds are not successful" do
assert_exp_cmds_error(CmdError){ subject.run_rm_tag_cmd(@tag) }
end
-
end
-
end