Created
May 19, 2015 16:22
-
-
Save aaron-lane/99616b5143b43f02fe07 to your computer and use it in GitHub Desktop.
What the stub?
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
module Foo | |
def self.bar | |
fail 'biz' | |
end | |
end |
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
Foo.bar | |
include_recipe 'cookbook::baz' |
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
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 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The stub of Foo.bar is not being respected 😢