Skip to content

Commit 8ba0ea5

Browse files
committed
Fix specs and Boolean class
1 parent f86fff5 commit 8ba0ea5

3 files changed

Lines changed: 7 additions & 6 deletions

File tree

chef/lib/chef/resource/group.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ def append(arg=nil)
6060
set_or_return(
6161
:append,
6262
arg,
63-
kind_of => [ Boolean ]
63+
:kind_of => [ TrueClass, FalseClass ]
6464
)
6565
end
6666
end

chef/spec/unit/provider/group/groupadd_spec.rb

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,8 @@
129129
@new_resource = mock("Chef::Resource::Group",
130130
:null_object => true,
131131
:group_name => "aj",
132-
:members => [ "all", "your", "base" ]
132+
:members => [ "all", "your", "base" ],
133+
:append => false
133134
)
134135
@new_resource.stub!(:to_s).and_return("group[aj]")
135136
@provider = Chef::Provider::Group::Groupadd.new(@node, @new_resource)

chef/spec/unit/resource/group_spec.rb

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -111,16 +111,16 @@
111111
end
112112

113113
it "should default to false" do
114-
@resource.gid.should eql(false)
114+
@resource.append.should eql(false)
115115
end
116116

117117
it "should allow a boolean" do
118-
@resource.gid true
119-
@resource.gid.should eql(true)
118+
@resource.append true
119+
@resource.append.should eql(true)
120120
end
121121

122122
it "should not allow a hash" do
123123
lambda { @resource.send(:gid, { :aj => "is freakin awesome" }) }.should raise_error(ArgumentError)
124124
end
125125

126-
end
126+
end

0 commit comments

Comments
 (0)