diff options
author | Tollef Fog Heen <tfheen@err.no> | 2010-04-19 21:45:30 +0200 |
---|---|---|
committer | Daniel DeLeo <dan@opscode.com> | 2010-05-01 10:00:18 -0700 |
commit | 3f686c1160ff83d80025cde6aad088b7007684e7 (patch) | |
tree | cf2c4146947b171abec9bc08fa002573d2bc793b /chef/spec/unit/knife/role_from_file_spec.rb | |
parent | 36b2259aff96e36ba12494887aa6ec4a49a031a3 (diff) | |
download | chef-3f686c1160ff83d80025cde6aad088b7007684e7.tar.gz |
Implement pluggable output formats for knife
You can now choose output formats for knife with the -f parameter.
Initially, JSON and YAML are implemented.
Diffstat (limited to 'chef/spec/unit/knife/role_from_file_spec.rb')
-rw-r--r-- | chef/spec/unit/knife/role_from_file_spec.rb | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/chef/spec/unit/knife/role_from_file_spec.rb b/chef/spec/unit/knife/role_from_file_spec.rb index 208a33ef15..6c4363057c 100644 --- a/chef/spec/unit/knife/role_from_file_spec.rb +++ b/chef/spec/unit/knife/role_from_file_spec.rb @@ -25,7 +25,7 @@ describe Chef::Knife::RoleFromFile do :print_after => nil } @knife.name_args = [ "adam.rb" ] - @knife.stub!(:json_pretty_print).and_return(true) + @knife.stub!(:output).and_return(true) @knife.stub!(:confirm).and_return(true) @role = Chef::Role.new() @role.stub!(:save) @@ -39,14 +39,14 @@ describe Chef::Knife::RoleFromFile do end it "should not print the role" do - @knife.should_not_receive(:json_pretty_print) + @knife.should_not_receive(:output) @knife.run end describe "with -p or --print-after" do it "should print the role" do @knife.config[:print_after] = true - @knife.should_receive(:json_pretty_print) + @knife.should_receive(:output) @knife.run end end |