Created
September 2, 2013 14:10
-
-
Save Porta/6413282 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| class Bucket < Ohm::Model | |
| attribute :name | |
| attribute :token | |
| list :unread, :Request | |
| end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ... | |
| 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">] != [] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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