Skip to content

Commit

Permalink
Prevent code reloading in knife tests (fixes constant warnings)
Browse files Browse the repository at this point in the history
  • Loading branch information
danielsdeleo committed Apr 24, 2014
1 parent 88254d7 commit fdd3027
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions spec/unit/knife_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,9 @@ module KnifeSpecs
Chef::Log.logger = Logger.new(StringIO.new)

Chef::Config[:node_name] = "webmonkey.example.com"

# Prevent gratuitous code reloading:
Chef::Knife.stub(:load_commands)
@knife = Chef::Knife.new
@knife.ui.stub(:puts)
@knife.ui.stub(:print)
Expand Down

0 comments on commit fdd3027

Please sign in to comment.