Skip to content

Commit

Permalink
Fix specs for new default branch, bump development Ruby -> 2.7.2
Browse files Browse the repository at this point in the history
Since the default branch became `main`, some specs that relied on the
default being `master` were failing. This change adds setup for examples
that depend on the old `master` branch being the default branch so that
the specs continue to work for both cases.

Bump the development version of Ruby to 2.7.2.
  • Loading branch information
geoffharcourt committed Feb 23, 2022
1 parent e2d0d9c commit 991d0a2
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .ruby-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2.5.3
2.7.2
12 changes: 10 additions & 2 deletions spec/parity/environment_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -233,13 +233,21 @@
it "returns false if the deploy was not succesful" do
allow(Kernel).to receive(:system).with(git_push).and_return(false)

result = Parity::Environment.new("production", ["deploy"]).run
env = Parity::Environment.new("production", ["deploy"])

allow(env).to receive(:branch_ref).and_return("master")

result = env.run

expect(result).to eq(false)
end

it "deploys feature branches to staging's master for evaluation" do
Parity::Environment.new("staging", ["deploy"]).run
env = Parity::Environment.new("staging", ["deploy"])

allow(env).to receive(:branch_ref).and_return("master")

env.run

expect(Kernel).to have_received(:system).with(git_push_feature_branch)
end
Expand Down

0 comments on commit 991d0a2

Please sign in to comment.