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:
parent
c08fb8a3bd
commit
c340bd4be2
|
@ -40,10 +40,11 @@ describe "Chef::Provider::PacemakerGroup" do
|
|||
end
|
||||
|
||||
it "should modify the group if it has different member resources" do
|
||||
fixture.members = %w(resource1 resource3)
|
||||
expected_configure_cmd_args = [fixture.reconfigure_command]
|
||||
expected = fixture.dup
|
||||
expected.members = %w(resource1 resource3)
|
||||
expected_configure_cmd_args = [expected.reconfigure_command]
|
||||
test_modify(expected_configure_cmd_args) do
|
||||
@resource.members fixture.members
|
||||
@resource.members expected.members
|
||||
end
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in New Issue