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

document ini resource #981

Merged
merged 1 commit into from
Aug 26, 2016
Merged

document ini resource #981

merged 1 commit into from
Aug 26, 2016

Conversation

vjeffrey
Copy link

@vjeffrey vjeffrey commented Aug 25, 2016

let me know if this is ok? i just kinda best-guessed it. @chris-rock

fixes #848


describe ini do
its('port') { should eq 143 }
its('server') { should eq 192.0.2.62 }

Choose a reason for hiding this comment

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

I'm curious... does this work? I'd think it'd look like '192.0.2.63'

@ksubrama
Copy link

@vjeffrey If you want to test this out try this:

$ cat ../foo.ini
ipaddress=192.168.1.1
foo= 45
$ bundle exec inspec shell -c "describe ini('../foo.ini') do its('ipaddress') {should eq '192.168.1.1'} end"
  ✔  INI ../foo.ini ipaddress should eq "192.168.1.1"

Summary: 1 successful, 0 failures, 0 skipped
$ bundle exec inspec shell -c "describe ini('../foo.ini') do its('foo') {should eq 45} end"
  ✖  INI ../foo.ini foo should eq 45 (
     expected: 45
          got: "45"

     (compared using ==)
     )

Summary: 0 successful, 1 failures, 0 skipped

@vjeffrey
Copy link
Author

vjeffrey commented Aug 25, 2016

oh thanks! i'll fix that all up later this afternoon :)

@chris-rock
Copy link
Contributor

Thanks @vjeffrey for the improvement and @ksubrama for the great review

@chris-rock chris-rock merged commit 1dbcab3 into master Aug 26, 2016
@chris-rock chris-rock deleted the vj/document-ini-resource branch August 26, 2016 08:04
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.

Document ini resource
4 participants