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

Configuration number comparisons #308

Closed
arlimus opened this issue Dec 10, 2015 · 1 comment
Closed

Configuration number comparisons #308

arlimus opened this issue Dec 10, 2015 · 1 comment
Labels
Type: Enhancement Improves an existing feature

Comments

@arlimus
Copy link
Contributor

arlimus commented Dec 10, 2015

When running against a configuration file with numbers, e.g. ssh_config with:

Port 22

The test would have to be written:

its('Port') { should eq '22' }

However users also expect to be able to write:

its('Port') { should eq 22 }

It would be great to find a way to reconcile this and help users to write the test they expect.

@arlimus arlimus added the Type: Enhancement Improves an existing feature label Dec 10, 2015
@chris-rock
Copy link
Contributor

with #318 it is possible to write:

describe sshd_config do
  its('Port') { should cmp '22' }
  its('Port') { should cmp 22 }
end

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Enhancement Improves an existing feature
Projects
None yet
Development

No branches or pull requests

2 participants