Reputation: 10366
What's the difference between these two?
it { should be_owned_by 'cool_user' }
vs
its('owner') { should eq 'cool_user' }
it { should be_grouped_into 'cool_group' }
vs
its('group') { should eq 'cool_group' }
Upvotes: 0
Views: 285
Reputation: 1169
Inspec supports both styles .
it { should be_owned_by 'cool_user' }
it { should be_grouped_into 'cool_group' }
Though this style looks more like serverspec way of writing it :)
Upvotes: 0
Reputation: 54211
No difference, just two ways to write it. https://github.com/chef/train/blob/master/lib/train/extras/file_common.rb#L107 and similar for the other.
Upvotes: 2