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

OS resource requires requires a Symbol not a String (wrong in docs) #224

Closed
stuartpreston opened this issue Nov 7, 2015 · 0 comments
Closed

Comments

@stuartpreston
Copy link

Platform: Windows 10/ChefDK 0.9/InSpec 0.9 + Test Kitchen/AzureRM driver/Windows 2012 R2 Datacenter instance.

As per https://docs.chef.io/release/compliance_1-0/inspec_os.html

Input:

describe os['family'] do
  it { should eq 'windows' }
end

Outcome:

  1)  should eq "windows"
     Failure/Error: it { should eq 'windows' }

       expected: "windows"
            got: nil

       (compared using ==)

Correct usage appears to be:

describe os[:family] do
  it { should eq 'windows' }
end

Submitting a doc PR for this shortly.

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

No branches or pull requests

1 participant