Skip to content

Commit

Permalink
Merge pull request chef#1263 from srenatus/patch-1
Browse files Browse the repository at this point in the history
Fix resource_spec.rb: it's only_if and not_if
  • Loading branch information
mcquin committed Jun 9, 2014
2 parents ae97f98 + 35583c8 commit 09f1912
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions spec/unit/resource_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -559,12 +559,12 @@ class ResourceTestHarness < Chef::Resource
@resource.should_skip?(:purr).should be_false
end

it "should return false when if_only is met" do
it "should return false when only_if is met" do
@resource.only_if { true }
@resource.should_skip?(:purr).should be_false
end

it "should return true when if_only is not met" do
it "should return true when only_if is not met" do
@resource.only_if { false }
@resource.should_skip?(:purr).should be_true
end
Expand All @@ -574,18 +574,18 @@ class ResourceTestHarness < Chef::Resource
@resource.should_skip?(:purr).should be_true
end

it "should return false when if_only is not met" do
it "should return false when not_if is not met" do
@resource.not_if { false }
@resource.should_skip?(:purr).should be_false
end

it "should return true when if_only is met but also not_if is met" do
it "should return true when only_if is met but also not_if is met" do
@resource.only_if { true }
@resource.not_if { true }
@resource.should_skip?(:purr).should be_true
end

it "should return true when one of multiple if_only's is not met" do
it "should return true when one of multiple only_if's is not met" do
@resource.only_if { true }
@resource.only_if { false }
@resource.only_if { true }
Expand Down

0 comments on commit 09f1912

Please sign in to comment.