Skip to content

Instantly share code, notes, and snippets.

@Porta
Created September 2, 2013 14:10
Show Gist options
  • Select an option

  • Save Porta/6413282 to your computer and use it in GitHub Desktop.

Select an option

Save Porta/6413282 to your computer and use it in GitHub Desktop.
class Bucket < Ohm::Model
attribute :name
attribute :token
list :unread, :Request
end
...
test: it should delete a request after it container list is deleted
line: assert_equal @bucket.unread.to_a, []
file: /home/porta/Dropbox/Code/cuba/poxy/test/bucket_test.rb +57
Cutest::AssertionFailed: [#<Request:0x000000026ec4c0 @attributes={}, @_memo={}, @id="1">] != []
test "it should remove a request from it's container list after it is deleted" do
request = Request.create(@req_opts)
@bucket.unread.push(request)
request.delete
assert_equal @bucket.unread.to_a, []
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment