Skip to content

Commit

Permalink
test: fix duplicate constant definition warning
Browse files Browse the repository at this point in the history
  • Loading branch information
bethesque committed Jun 6, 2019
1 parent f19f002 commit 481e045
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ module Pacticipants
describe FindPotentialDuplicatePacticipantNames do

describe "split" do
TEST_CASES = [
SPLIT_TEST_CASES = [
["a-foo-service", ["a", "foo", "service"]],
["a_foo_service", ["a", "foo", "service"]],
["FooAService", ["foo", "a", "service"]],
Expand All @@ -19,7 +19,7 @@ module Pacticipants
["S3_Bucket_Service", ["s3", "bucket", "service"]],
]

TEST_CASES.each do | input, output |
SPLIT_TEST_CASES.each do | input, output |
it "splits #{input} into #{output.inspect}" do
expect(FindPotentialDuplicatePacticipantNames.split(input)).to eq output
end
Expand All @@ -31,7 +31,7 @@ module Pacticipants
subject { FindPotentialDuplicatePacticipantNames.call(new_name, existing_names) }


TEST_CASES = [
CALL_TEST_CASES = [
["accounts", ["accounts-receivable"], []],
["Accounts", ["Accounts Receivable"], []],
["The Accounts", ["Accounts"], []],
Expand All @@ -47,7 +47,7 @@ module Pacticipants
['Contract_Service', ['ContractsService', 'Contracts Service', 'contracts-service', 'Contacts', 'Something'], ['ContractsService', 'Contracts Service', 'contracts-service']]
]

TEST_CASES.each do | the_new_name, the_existing_names, the_expected_duplicates |
CALL_TEST_CASES.each do | the_new_name, the_existing_names, the_expected_duplicates |
context "when the new name is #{the_new_name} and the existing names are #{the_existing_names.inspect}" do
let(:new_name) { the_new_name }
let(:existing_names) { the_existing_names }
Expand Down

0 comments on commit 481e045

Please sign in to comment.