-
-
Save mhenrixon/0ade32a7dba5cc272033 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Public: Stubs partial search | |
# Examples => | |
# stub_partial_search(:node, 'name:web*').and_return([{ 'fqdn' => 'web01.example.com' }]) | |
# | |
def stub_partial_search(type, query) | |
allow(Chef).to receive(:partial_search).and_call_original | |
expect(Chef).to receive(:partial_search).with(type, query, any_args) | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment