Skip to content

Commit

Permalink
fixed rspec tests for chef-data option
Browse files Browse the repository at this point in the history
  • Loading branch information
siddheshwar-more committed Aug 29, 2013
1 parent 1e72c44 commit 0caa92e
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions spec/unit/server_list_command_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,9 @@
end

describe "#get_resource_col_val" do
let (:resources) {[ TestResource.new({:id => "server-1", :name => "server-1", :os => "ubuntu"}), TestResource.new({:id => "server-2", :name => "server-2", :os => "windows"})]}
before(:each) do
class Derived < Chef::Knife::Cloud::ServerListCommand
let (:resources) {[ TestResource.new({:id => "server-1", :name => "server-1", :os => "ubuntu"})]}
before do
class DerivedServerList < Chef::Knife::Cloud::ServerListCommand
attr_accessor :node
def before_exec_command
@columns_with_info = [ { :key => 'id', :label => 'Instance ID' }, {:label => 'Environment', :key => 'chef_environment'}, {:label => 'platform_family', :key => 'platform_family'} ]
Expand All @@ -55,7 +55,7 @@ def before_exec_command
@node_list = {"server-1" => @node}
end
end
@derived_instance = Derived.new
@derived_instance = DerivedServerList.new
@derived_instance.config[:chef_data] = true
@derived_instance.config[:chef_node_attribute] = "platform_family"
@derived_instance.before_exec_command
Expand Down

0 comments on commit 0caa92e

Please sign in to comment.