I think you can also write it as something like this:

```ruby
it 'should contain the login settings' do
  should contain_concat_fragment('foreman_settings+01-header.yaml').with_content(/:login:\s*true/)
  should contain_concat_fragment('foreman_settings+01-header.yaml').with_content(/:require_ssl:\s*true/)
  should contain_concat_fragment('foreman_settings+01-header.yaml').with_content(/:oauth_consumer_secret:\s*\w+/)
end
```