avoid test messing with fixture
Assigning to `fixture` means that the change to the fixture can leak out to other tests, so we assign to a temporary variable instead.
This commit is contained in:
@@ -40,10 +40,11 @@ describe "Chef::Provider::PacemakerGroup" do
|
|||||||
end
|
end
|
||||||
|
|
||||||
it "should modify the group if it has different member resources" do
|
it "should modify the group if it has different member resources" do
|
||||||
fixture.members = %w(resource1 resource3)
|
expected = fixture.dup
|
||||||
expected_configure_cmd_args = [fixture.reconfigure_command]
|
expected.members = %w(resource1 resource3)
|
||||||
|
expected_configure_cmd_args = [expected.reconfigure_command]
|
||||||
test_modify(expected_configure_cmd_args) do
|
test_modify(expected_configure_cmd_args) do
|
||||||
@resource.members fixture.members
|
@resource.members expected.members
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user