Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Eliminate more "multiple expectations" warnings and remove some redundant specs #601

Merged
merged 1 commit into from
Sep 5, 2017

Conversation

wyardley
Copy link
Contributor

@wyardley wyardley commented Sep 4, 2017

Would appreciate feedback on this one.

expect(policy[:definition]['ha-params']).to be_a(Array)
expect(policy[:definition]['ha-params'][0]).to eq('rabbit@rabbit-01')
expect(policy[:definition]['ha-params'][1]).to eq('rabbit@rabbit-02')
context 'accepts list value in ha-params when ha-mode = nodes' do
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this works Ok here, but not sure if there's a better way to do it.


it do
expect(policy[:definition]['ha-mode']).to eq('nodes')
end
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I might be tempted to use a single line for each of these?
ie.

it { expect(policy[:definition]['ha-mode']).to eq('nodes') }

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will do. You think moving the outer bit to a context makes sense here though?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated, btw, if you want to re-review

@alexjfisher alexjfisher merged commit 69b89bc into voxpupuli:master Sep 5, 2017
@wyardley wyardley deleted the multiple_expectations2 branch September 9, 2017 23:29
Slm0n87 pushed a commit to Slm0n87/puppet-rabbitmq that referenced this pull request Mar 7, 2019
Eliminate more "multiple expectations" warnings and remove some redundant specs
cegeka-jenkins pushed a commit to cegeka/puppet-rabbitmq that referenced this pull request Mar 26, 2021
Eliminate more "multiple expectations" warnings and remove some redundant specs
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants