From 79aeaec98b55ef68bae9bf0a5cb61fbe4e649279 Mon Sep 17 00:00:00 2001 From: Kamil Trzcinski Date: Mon, 3 Aug 2015 16:25:16 +0200 Subject: Rename all occurrences of type to stage --- spec/lib/gitlab_ci_yaml_processor_spec.rb | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) (limited to 'spec') diff --git a/spec/lib/gitlab_ci_yaml_processor_spec.rb b/spec/lib/gitlab_ci_yaml_processor_spec.rb index c6d6832..db2348a 100644 --- a/spec/lib/gitlab_ci_yaml_processor_spec.rb +++ b/spec/lib/gitlab_ci_yaml_processor_spec.rb @@ -13,8 +13,8 @@ describe GitlabCiYamlProcessor do config_processor = GitlabCiYamlProcessor.new(config) - config_processor.builds_for_type_and_ref(type, "master").size.should == 1 - config_processor.builds_for_type_and_ref(type, "master").first.should == { + config_processor.builds_for_stage_and_ref(type, "master").size.should == 1 + config_processor.builds_for_stage_and_ref(type, "master").first.should == { type: "test", except: nil, name: :rspec, @@ -34,7 +34,7 @@ describe GitlabCiYamlProcessor do config_processor = GitlabCiYamlProcessor.new(config) - config_processor.builds_for_type_and_ref(type, "master").size.should == 0 + config_processor.builds_for_stage_and_ref(type, "master").size.should == 0 end it "does not return builds if only has regexp with another branch" do @@ -45,7 +45,7 @@ describe GitlabCiYamlProcessor do config_processor = GitlabCiYamlProcessor.new(config) - config_processor.builds_for_type_and_ref(type, "master").size.should == 0 + config_processor.builds_for_stage_and_ref(type, "master").size.should == 0 end it "returns builds if only has specified this branch" do @@ -56,7 +56,7 @@ describe GitlabCiYamlProcessor do config_processor = GitlabCiYamlProcessor.new(config) - config_processor.builds_for_type_and_ref(type, "master").size.should == 1 + config_processor.builds_for_stage_and_ref(type, "master").size.should == 1 end it "does not build tags" do @@ -67,7 +67,7 @@ describe GitlabCiYamlProcessor do config_processor = GitlabCiYamlProcessor.new(config) - config_processor.builds_for_type_and_ref(type, "0-1", true).size.should == 0 + config_processor.builds_for_stage_and_ref(type, "0-1", true).size.should == 0 end it "returns builds if only has a list of branches including specified" do @@ -78,7 +78,7 @@ describe GitlabCiYamlProcessor do config_processor = GitlabCiYamlProcessor.new(config) - config_processor.builds_for_type_and_ref(type, "deploy").size.should == 1 + config_processor.builds_for_stage_and_ref(type, "deploy").size.should == 1 end it "returns build only for specified type" do @@ -93,9 +93,9 @@ describe GitlabCiYamlProcessor do config_processor = GitlabCiYamlProcessor.new(config) - config_processor.builds_for_type_and_ref("production", "deploy").size.should == 0 - config_processor.builds_for_type_and_ref(type, "deploy").size.should == 1 - config_processor.builds_for_type_and_ref("deploy", "deploy").size.should == 2 + config_processor.builds_for_stage_and_ref("production", "deploy").size.should == 0 + config_processor.builds_for_stage_and_ref(type, "deploy").size.should == 1 + config_processor.builds_for_stage_and_ref("deploy", "deploy").size.should == 2 end end @@ -110,8 +110,8 @@ describe GitlabCiYamlProcessor do config_processor = GitlabCiYamlProcessor.new(config) - config_processor.builds_for_type_and_ref("test", "master").size.should == 1 - config_processor.builds_for_type_and_ref("test", "master").first.should == { + config_processor.builds_for_stage_and_ref("test", "master").size.should == 1 + config_processor.builds_for_stage_and_ref("test", "master").first.should == { except: nil, type: "test", name: :rspec, @@ -136,8 +136,8 @@ describe GitlabCiYamlProcessor do config_processor = GitlabCiYamlProcessor.new(config) - config_processor.builds_for_type_and_ref("test", "master").size.should == 1 - config_processor.builds_for_type_and_ref("test", "master").first.should == { + config_processor.builds_for_stage_and_ref("test", "master").size.should == 1 + config_processor.builds_for_stage_and_ref("test", "master").first.should == { except: nil, type: "test", name: :rspec, -- cgit v1.2.1