Created
November 11, 2008 22:16
-
-
Save jackdempsey/23994 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
| >> Gist.all.destroy! | |
| ~ DELETE FROM `gists` | |
| => true | |
| >> Gist.create(:url => "test") | |
| ~ INSERT INTO `gists` (`updated_at`, `created_at`, `url`) VALUES ('2008-11-11 17:12:48', '2008-11-11 17:12:48', 'test') | |
| => #<Gist id=8 name=nil url="test" updated_at=#<DateTime: 2209304183/900,-5/24,2299161> created_at=#<DateTime: 2209304183/900,-5/24,2299161>> | |
| >> Gist.get(1) | |
| ~ SELECT `id`, `name`, `url`, `updated_at`, `created_at` FROM `gists` WHERE (`id` = 1) ORDER BY `id` LIMIT 1 | |
| => nil | |
| >> Gist.get(1) | |
| ~ SELECT `id`, `name`, `url`, `updated_at`, `created_at` FROM `gists` WHERE (`id` = 1) ORDER BY `id` LIMIT 1 | |
| => nil | |
| >> Gist.get("this should not return an object") | |
| ~ SELECT `id`, `name`, `url`, `updated_at`, `created_at` FROM `gists` WHERE (`id` IS NULL) ORDER BY `id` LIMIT 1 | |
| => #<Gist id=8 name=nil url="test" updated_at=#<DateTime: 2209304183/900,-5/24,2299161> created_at=#<DateTime: 2209304183/900,-5/24,2299161>> | |
| >> Gist.get("this should not return an object and now won't") | |
| ~ SELECT `id`, `name`, `url`, `updated_at`, `created_at` FROM `gists` WHERE (`id` IS NULL) ORDER BY `id` LIMIT 1 | |
| => nil |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment