Skip to content

Commit

Permalink
feat: update wording of version description for version in environment
Browse files Browse the repository at this point in the history
  • Loading branch information
bethesque committed Oct 14, 2022
1 parent 102b193 commit d122fa6
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions lib/pact_broker/matrix/resolved_selector.rb
Original file line number Diff line number Diff line change
Expand Up @@ -211,9 +211,9 @@ def description
"a version of #{pacticipant_name} with tag #{tag} (no such version exists)"
elsif environment_name && pacticipant_version_number
prefix = one_of_many? ? "one of the versions" : "the version"
"#{prefix} of #{pacticipant_name} currently deployed or released to #{environment_name} (#{pacticipant_version_number})"
"#{prefix} of #{pacticipant_name} currently in #{environment_name} (#{pacticipant_version_number})"
elsif environment_name
"a version of #{pacticipant_name} currently deployed or released to #{environment_name} (no version is currently recorded as deployed/released in this environment)"
"a version of #{pacticipant_name} currently in #{environment_name} (no version is currently recorded as deployed/released in this environment)"
elsif pacticipant_version_number && version_does_not_exist?
"version #{pacticipant_version_number} of #{pacticipant_name} (no such version exists)"
elsif pacticipant_version_number
Expand Down
4 changes: 2 additions & 2 deletions spec/lib/pact_broker/matrix/resolved_selector_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ module Matrix
context "when it was specified by environment" do
let(:environment_name) { "test" }

its(:description) { is_expected.to eq "the version of Foo currently deployed or released to test (123)" }
its(:description) { is_expected.to eq "the version of Foo currently in test (123)" }
end

context "when it was specified by version number" do
Expand Down Expand Up @@ -165,7 +165,7 @@ module Matrix
context "when it was specified by environment" do
let(:environment_name) { "test" }

its(:description) { is_expected.to eq "a version of Foo currently deployed or released to test (no version is currently recorded as deployed/released in this environment)" }
its(:description) { is_expected.to eq "a version of Foo currently in test (no version is currently recorded as deployed/released in this environment)" }
its(:version_does_not_exist_description) { is_expected.to eq "No version of Foo is currently recorded as deployed or released in environment test" }
end

Expand Down

0 comments on commit d122fa6

Please sign in to comment.