Skip to content

Instantly share code, notes, and snippets.

@elrayle
Created July 16, 2015 18:41
Show Gist options
  • Save elrayle/6a60dd51a0f068229fc6 to your computer and use it in GitHub Desktop.
Save elrayle/6a60dd51a0f068229fc6 to your computer and use it in GitHub Desktop.
activefedora-aggregation #delete and testing
describe "delete fails" do
before do
image.child_objects = [test_object]
expect( image.child_objects ).to eq [test_object] # FAILS when using this line
image.child_objects.delete(test_object)
end
subject { image.child_objects }
it { is_expected.to eq [] }
end
describe "delete works" do
before do
image.child_objects = [test_object]
image.child_objects # WORKS when using this line
image.child_objects.delete(test_object)
end
subject { image.child_objects }
it { is_expected.to eq [] }
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment