Skip to content

Instantly share code, notes, and snippets.

@aaron-lane
Created May 19, 2015 16:22
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save aaron-lane/99616b5143b43f02fe07 to your computer and use it in GitHub Desktop.
Save aaron-lane/99616b5143b43f02fe07 to your computer and use it in GitHub Desktop.
What the stub?
module Foo
def self.bar
fail 'biz'
end
end
Foo.bar
include_recipe 'cookbook::baz'
require_relative '../../../libraries/foo'
RSpec.describe 'cookbook::default' do
before :example do
allow(Foo).to receive(:bar).and_return true
end
subject { chef_run }
it { is_expected.to include_recipe 'cookbook::baz' }
end
@aaron-lane
Copy link
Author

The stub of Foo.bar is not being respected 😢

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment