diff --git a/plugins/pushes/heroku/config.rb b/plugins/pushes/heroku/config.rb index fd7b210ce..927c1a7b9 100644 --- a/plugins/pushes/heroku/config.rb +++ b/plugins/pushes/heroku/config.rb @@ -22,17 +22,12 @@ module VagrantPlugins # @return [String] attr_accessor :remote - # The Git branch to push to (default: "master"). - # @return [String] - attr_accessor :branch - def initialize @app = UNSET_VALUE @dir = UNSET_VALUE @git_bin = UNSET_VALUE @remote = UNSET_VALUE - @branch = UNSET_VALUE end def finalize! @@ -41,7 +36,6 @@ module VagrantPlugins @git_bin = "git" if @git_bin == UNSET_VALUE @remote = "heroku" if @remote == UNSET_VALUE - @branch = "master" if @branch == UNSET_VALUE end def validate(machine) @@ -65,12 +59,6 @@ module VagrantPlugins ) end - if missing?(@branch) - errors << I18n.t("heroku_push.errors.missing_attribute", - attribute: "branch", - ) - end - { "Heroku push" => errors } end diff --git a/test/unit/plugins/pushes/heroku/config_test.rb b/test/unit/plugins/pushes/heroku/config_test.rb index 0a157b17e..e451ad152 100644 --- a/test/unit/plugins/pushes/heroku/config_test.rb +++ b/test/unit/plugins/pushes/heroku/config_test.rb @@ -42,13 +42,6 @@ describe VagrantPlugins::HerokuPush::Config do end end - describe "#branch" do - it "defaults to git" do - subject.finalize! - expect(subject.branch).to eq("master") - end - end - describe "#validate" do before do allow(machine).to receive(:env) @@ -60,7 +53,6 @@ describe VagrantPlugins::HerokuPush::Config do subject.dir = "." subject.git_bin = "git" subject.remote = "heroku" - subject.branch = "master" end let(:result) { subject.validate(machine) } @@ -94,16 +86,6 @@ describe VagrantPlugins::HerokuPush::Config do end end - context "when the branch is missing" do - it "returns an error" do - subject.branch = "" - subject.finalize! - expect(errors).to include(I18n.t("heroku_push.errors.missing_attribute", - attribute: "branch", - )) - end - end - context "when the dir is missing" do it "returns an error" do subject.dir = ""