Permalink
Browse files

tests pass, ship it

  • Loading branch information...
1 parent c5e2ddd commit 256e5cb889e8ba16ac9c174500b6eb5ce28706d0 @capotej capotej committed Apr 23, 2010
Showing with 376 additions and 13 deletions.
  1. +1 −1 lib/existential.rb
  2. +1 −1 rails/init.rb
  3. +370 −0 test/debug.log
  4. BIN test/existential_plugin.sqlite3
  5. +4 −11 test/existential_test.rb
View
2 lib/existential.rb
@@ -1 +1 @@
-# Existential
+require 'existential/is_existential'
View
2 rails/init.rb
@@ -1 +1 @@
-# Include hook code here
+require 'lib/existential'
View
370 test/debug.log
@@ -398,3 +398,373 @@
FROM sqlite_master
WHERE type = 'table' AND NOT name = 'sqlite_sequence'

+ SQL (0.2ms) select sqlite_version(*)
+ SQL (0.3ms)  SELECT name
+ FROM sqlite_master
+ WHERE type = 'table' AND NOT name = 'sqlite_sequence'
+
+ SQL (1.3ms) DROP TABLE "users"
+ SQL (0.9ms) CREATE TABLE "users" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255)) 
+ SQL (0.2ms)  SELECT name
+ FROM sqlite_master
+ WHERE type = 'table' AND NOT name = 'sqlite_sequence'
+
+ SQL (0.9ms) DROP TABLE "posts"
+ SQL (0.9ms) CREATE TABLE "posts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "user_id" varchar(255)) 
+ SQL (0.2ms)  SELECT name
+ FROM sqlite_master
+ WHERE type = 'table' AND NOT name = 'sqlite_sequence'
+
+ SQL (0.1ms) SELECT version FROM "schema_migrations"
+ SQL (0.2ms)  SELECT name
+ FROM sqlite_master
+ WHERE type = 'table' AND NOT name = 'sqlite_sequence'
+
+ SQL (0.2ms) select sqlite_version(*)
+ SQL (0.3ms)  SELECT name
+ FROM sqlite_master
+ WHERE type = 'table' AND NOT name = 'sqlite_sequence'
+
+ SQL (1.4ms) DROP TABLE "users"
+ SQL (0.9ms) CREATE TABLE "users" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255)) 
+ SQL (0.2ms)  SELECT name
+ FROM sqlite_master
+ WHERE type = 'table' AND NOT name = 'sqlite_sequence'
+
+ SQL (0.9ms) DROP TABLE "posts"
+ SQL (0.9ms) CREATE TABLE "posts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "user_id" varchar(255)) 
+ SQL (0.2ms)  SELECT name
+ FROM sqlite_master
+ WHERE type = 'table' AND NOT name = 'sqlite_sequence'
+
+ SQL (0.1ms) SELECT version FROM "schema_migrations"
+ SQL (0.2ms)  SELECT name
+ FROM sqlite_master
+ WHERE type = 'table' AND NOT name = 'sqlite_sequence'
+
+ SQL (0.2ms) select sqlite_version(*)
+ SQL (0.3ms)  SELECT name
+ FROM sqlite_master
+ WHERE type = 'table' AND NOT name = 'sqlite_sequence'
+
+ SQL (1.4ms) DROP TABLE "users"
+ SQL (1.0ms) CREATE TABLE "users" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255)) 
+ SQL (0.2ms)  SELECT name
+ FROM sqlite_master
+ WHERE type = 'table' AND NOT name = 'sqlite_sequence'
+
+ SQL (0.9ms) DROP TABLE "posts"
+ SQL (0.9ms) CREATE TABLE "posts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "user_id" varchar(255)) 
+ SQL (0.2ms)  SELECT name
+ FROM sqlite_master
+ WHERE type = 'table' AND NOT name = 'sqlite_sequence'
+
+ SQL (0.1ms) SELECT version FROM "schema_migrations"
+ SQL (0.2ms)  SELECT name
+ FROM sqlite_master
+ WHERE type = 'table' AND NOT name = 'sqlite_sequence'
+
+ SQL (0.2ms) select sqlite_version(*)
+ SQL (0.3ms)  SELECT name
+ FROM sqlite_master
+ WHERE type = 'table' AND NOT name = 'sqlite_sequence'
+
+ SQL (1.4ms) DROP TABLE "users"
+ SQL (0.9ms) CREATE TABLE "users" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255)) 
+ SQL (0.2ms)  SELECT name
+ FROM sqlite_master
+ WHERE type = 'table' AND NOT name = 'sqlite_sequence'
+
+ SQL (1.0ms) DROP TABLE "posts"
+ SQL (1.0ms) CREATE TABLE "posts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "user_id" varchar(255)) 
+ SQL (0.3ms)  SELECT name
+ FROM sqlite_master
+ WHERE type = 'table' AND NOT name = 'sqlite_sequence'
+
+ SQL (0.1ms) SELECT version FROM "schema_migrations"
+ SQL (0.2ms)  SELECT name
+ FROM sqlite_master
+ WHERE type = 'table' AND NOT name = 'sqlite_sequence'
+
+ SQL (0.2ms) select sqlite_version(*)
+ SQL (0.3ms)  SELECT name
+ FROM sqlite_master
+ WHERE type = 'table' AND NOT name = 'sqlite_sequence'
+
+ SQL (1.2ms) DROP TABLE "users"
+ SQL (0.9ms) CREATE TABLE "users" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255)) 
+ SQL (0.3ms)  SELECT name
+ FROM sqlite_master
+ WHERE type = 'table' AND NOT name = 'sqlite_sequence'
+
+ SQL (0.9ms) DROP TABLE "posts"
+ SQL (0.8ms) CREATE TABLE "posts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "user_id" varchar(255)) 
+ SQL (0.3ms)  SELECT name
+ FROM sqlite_master
+ WHERE type = 'table' AND NOT name = 'sqlite_sequence'
+
+ SQL (0.2ms) SELECT version FROM "schema_migrations"
+ SQL (0.3ms)  SELECT name
+ FROM sqlite_master
+ WHERE type = 'table' AND NOT name = 'sqlite_sequence'
+
+ SQL (0.2ms) select sqlite_version(*)
+ SQL (0.3ms)  SELECT name
+ FROM sqlite_master
+ WHERE type = 'table' AND NOT name = 'sqlite_sequence'
+
+ SQL (1.4ms) DROP TABLE "users"
+ SQL (1.0ms) CREATE TABLE "users" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255)) 
+ SQL (0.3ms)  SELECT name
+ FROM sqlite_master
+ WHERE type = 'table' AND NOT name = 'sqlite_sequence'
+
+ SQL (0.9ms) DROP TABLE "posts"
+ SQL (1.0ms) CREATE TABLE "posts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "user_id" varchar(255)) 
+ SQL (0.2ms)  SELECT name
+ FROM sqlite_master
+ WHERE type = 'table' AND NOT name = 'sqlite_sequence'
+
+ SQL (0.1ms) SELECT version FROM "schema_migrations"
+ ExistentialTest::User Load (0.2ms) SELECT * FROM "users" 
+ ExistentialTest::Post Load (0.1ms) SELECT * FROM "posts" 
+ ExistentialTest::User Create (0.7ms) INSERT INTO "users" ("name") VALUES('fred')
+ ExistentialTest::User Create (0.5ms) INSERT INTO "users" ("name") VALUES('bob')
+ ExistentialTest::User Load (0.4ms) SELECT * FROM "users" 
+ ExistentialTest::User Destroy (0.3ms) DELETE FROM "users" WHERE "id" = 1
+ ExistentialTest::User Destroy (0.2ms) DELETE FROM "users" WHERE "id" = 2
+ ExistentialTest::Post Load (0.1ms) SELECT * FROM "posts" 
+ ExistentialTest::User Create (0.2ms) INSERT INTO "users" ("name") VALUES('fred')
+ ExistentialTest::User Create (0.2ms) INSERT INTO "users" ("name") VALUES('bob')
+ SQL (0.2ms) select sqlite_version(*)
+ SQL (0.4ms)  SELECT name
+ FROM sqlite_master
+ WHERE type = 'table' AND NOT name = 'sqlite_sequence'
+
+ SQL (1.0ms) DROP TABLE "users"
+ SQL (0.8ms) CREATE TABLE "users" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255)) 
+ SQL (0.2ms)  SELECT name
+ FROM sqlite_master
+ WHERE type = 'table' AND NOT name = 'sqlite_sequence'
+
+ SQL (0.8ms) DROP TABLE "posts"
+ SQL (0.8ms) CREATE TABLE "posts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "user_id" varchar(255)) 
+ SQL (0.9ms)  SELECT name
+ FROM sqlite_master
+ WHERE type = 'table' AND NOT name = 'sqlite_sequence'
+
+ SQL (0.1ms) SELECT version FROM "schema_migrations"
+ ExistentialTest::User Load (0.3ms) SELECT * FROM "users" 
+ ExistentialTest::Post Load (0.1ms) SELECT * FROM "posts" 
+ ExistentialTest::User Load (0.1ms) SELECT * FROM "users" 
+ ExistentialTest::Post Load (0.1ms) SELECT * FROM "posts" 
+ SQL (0.3ms)  SELECT name
+ FROM sqlite_master
+ WHERE type = 'table' AND NOT name = 'sqlite_sequence'
+
+ SQL (0.3ms)  SELECT name
+ FROM sqlite_master
+ WHERE type = 'table' AND NOT name = 'sqlite_sequence'
+
+ SQL (0.2ms) select sqlite_version(*)
+ SQL (0.4ms)  SELECT name
+ FROM sqlite_master
+ WHERE type = 'table' AND NOT name = 'sqlite_sequence'
+
+ SQL (1.1ms) DROP TABLE "users"
+ SQL (0.9ms) CREATE TABLE "users" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255)) 
+ SQL (0.2ms)  SELECT name
+ FROM sqlite_master
+ WHERE type = 'table' AND NOT name = 'sqlite_sequence'
+
+ SQL (0.9ms) DROP TABLE "posts"
+ SQL (0.9ms) CREATE TABLE "posts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "user_id" varchar(255)) 
+ SQL (0.2ms)  SELECT name
+ FROM sqlite_master
+ WHERE type = 'table' AND NOT name = 'sqlite_sequence'
+
+ SQL (0.1ms) SELECT version FROM "schema_migrations"
+ ExistentialTest::User Load (0.2ms) SELECT * FROM "users" 
+ ExistentialTest::Post Load (0.1ms) SELECT * FROM "posts" 
+ ExistentialTest::User Create (0.6ms) INSERT INTO "users" ("name") VALUES('fred')
+ ExistentialTest::User Create (0.8ms) INSERT INTO "users" ("name") VALUES('bob')
+ ExistentialTest::User Load (0.3ms) SELECT * FROM "users" 
+ ExistentialTest::User Destroy (0.4ms) DELETE FROM "users" WHERE "id" = 1
+ ExistentialTest::User Destroy (0.2ms) DELETE FROM "users" WHERE "id" = 2
+ ExistentialTest::Post Load (0.1ms) SELECT * FROM "posts" 
+ ExistentialTest::User Create (0.3ms) INSERT INTO "users" ("name") VALUES('fred')
+ ExistentialTest::User Create (0.2ms) INSERT INTO "users" ("name") VALUES('bob')
+ SQL (0.2ms) select sqlite_version(*)
+ SQL (0.3ms)  SELECT name
+ FROM sqlite_master
+ WHERE type = 'table' AND NOT name = 'sqlite_sequence'
+
+ SQL (1.4ms) DROP TABLE "users"
+ SQL (0.9ms) CREATE TABLE "users" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255)) 
+ SQL (0.3ms)  SELECT name
+ FROM sqlite_master
+ WHERE type = 'table' AND NOT name = 'sqlite_sequence'
+
+ SQL (0.9ms) DROP TABLE "posts"
+ SQL (0.9ms) CREATE TABLE "posts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "user_id" varchar(255)) 
+ SQL (0.3ms)  SELECT name
+ FROM sqlite_master
+ WHERE type = 'table' AND NOT name = 'sqlite_sequence'
+
+ SQL (0.1ms) SELECT version FROM "schema_migrations"
+ SQL (0.2ms)  SELECT name
+ FROM sqlite_master
+ WHERE type = 'table' AND NOT name = 'sqlite_sequence'
+
+ SQL (0.6ms) select sqlite_version(*)
+ SQL (0.4ms)  SELECT name
+ FROM sqlite_master
+ WHERE type = 'table' AND NOT name = 'sqlite_sequence'
+
+ SQL (1.1ms) DROP TABLE "users"
+ SQL (0.8ms) CREATE TABLE "users" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255)) 
+ SQL (0.3ms)  SELECT name
+ FROM sqlite_master
+ WHERE type = 'table' AND NOT name = 'sqlite_sequence'
+
+ SQL (1.0ms) DROP TABLE "posts"
+ SQL (0.9ms) CREATE TABLE "posts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "user_id" varchar(255)) 
+ SQL (0.2ms)  SELECT name
+ FROM sqlite_master
+ WHERE type = 'table' AND NOT name = 'sqlite_sequence'
+
+ SQL (0.1ms) SELECT version FROM "schema_migrations"
+ ExistentialTest::User Load (0.2ms) SELECT * FROM "users" 
+ ExistentialTest::Post Load (0.1ms) SELECT * FROM "posts" 
+ ExistentialTest::User Create (0.3ms) INSERT INTO "users" ("name") VALUES('fred')
+ ExistentialTest::User Create (0.3ms) INSERT INTO "users" ("name") VALUES('bob')
+ ExistentialTest::User Load (0.2ms) SELECT * FROM "users" 
+ ExistentialTest::User Destroy (0.4ms) DELETE FROM "users" WHERE "id" = 1
+ ExistentialTest::User Destroy (0.4ms) DELETE FROM "users" WHERE "id" = 2
+ ExistentialTest::Post Load (0.2ms) SELECT * FROM "posts" 
+ ExistentialTest::User Create (0.3ms) INSERT INTO "users" ("name") VALUES('fred')
+ ExistentialTest::User Create (0.3ms) INSERT INTO "users" ("name") VALUES('bob')
+ SQL (0.4ms) select sqlite_version(*)
+ SQL (0.6ms)  SELECT name
+ FROM sqlite_master
+ WHERE type = 'table' AND NOT name = 'sqlite_sequence'
+
+ SQL (2.1ms) DROP TABLE "users"
+ SQL (0.9ms) CREATE TABLE "users" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255)) 
+ SQL (0.3ms)  SELECT name
+ FROM sqlite_master
+ WHERE type = 'table' AND NOT name = 'sqlite_sequence'
+
+ SQL (1.0ms) DROP TABLE "posts"
+ SQL (0.9ms) CREATE TABLE "posts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "user_id" varchar(255)) 
+ SQL (0.2ms)  SELECT name
+ FROM sqlite_master
+ WHERE type = 'table' AND NOT name = 'sqlite_sequence'
+
+ SQL (0.1ms) SELECT version FROM "schema_migrations"
+ ExistentialTest::User Load (0.2ms) SELECT * FROM "users" 
+ ExistentialTest::Post Load (0.1ms) SELECT * FROM "posts" 
+ ExistentialTest::User Create (0.3ms) INSERT INTO "users" ("name") VALUES('fred')
+ ExistentialTest::User Create (0.2ms) INSERT INTO "users" ("name") VALUES('bob')
+ ExistentialTest::User Load (0.2ms) SELECT * FROM "users" 
+ ExistentialTest::User Destroy (0.6ms) DELETE FROM "users" WHERE "id" = 1
+ ExistentialTest::User Destroy (0.3ms) DELETE FROM "users" WHERE "id" = 2
+ ExistentialTest::Post Load (0.2ms) SELECT * FROM "posts" 
+ ExistentialTest::User Create (0.6ms) INSERT INTO "users" ("name") VALUES('fred')
+ ExistentialTest::User Create (0.3ms) INSERT INTO "users" ("name") VALUES('bob')
+ SQL (0.3ms) select sqlite_version(*)
+ SQL (0.4ms)  SELECT name
+ FROM sqlite_master
+ WHERE type = 'table' AND NOT name = 'sqlite_sequence'
+
+ SQL (1.5ms) DROP TABLE "users"
+ SQL (1.1ms) CREATE TABLE "users" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255)) 
+ SQL (0.3ms)  SELECT name
+ FROM sqlite_master
+ WHERE type = 'table' AND NOT name = 'sqlite_sequence'
+
+ SQL (1.0ms) DROP TABLE "posts"
+ SQL (0.9ms) CREATE TABLE "posts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "user_id" varchar(255)) 
+ SQL (0.2ms)  SELECT name
+ FROM sqlite_master
+ WHERE type = 'table' AND NOT name = 'sqlite_sequence'
+
+ SQL (0.1ms) SELECT version FROM "schema_migrations"
+ ExistentialTest::User Load (0.2ms) SELECT * FROM "users" 
+ ExistentialTest::Post Load (0.1ms) SELECT * FROM "posts" 
+ ExistentialTest::User Create (0.4ms) INSERT INTO "users" ("name") VALUES('fred')
+ ExistentialTest::User Create (0.4ms) INSERT INTO "users" ("name") VALUES('bob')
+ ExistentialTest::User Load (0.5ms) SELECT * FROM "users" 
+ ExistentialTest::User Destroy (0.3ms) DELETE FROM "users" WHERE "id" = 1
+ ExistentialTest::User Destroy (0.2ms) DELETE FROM "users" WHERE "id" = 2
+ ExistentialTest::Post Load (0.1ms) SELECT * FROM "posts" 
+ ExistentialTest::User Create (0.2ms) INSERT INTO "users" ("name") VALUES('fred')
+ ExistentialTest::User Create (0.4ms) INSERT INTO "users" ("name") VALUES('bob')
+ SQL (0.2ms) select sqlite_version(*)
+ SQL (0.3ms)  SELECT name
+ FROM sqlite_master
+ WHERE type = 'table' AND NOT name = 'sqlite_sequence'
+
+ SQL (2.3ms) DROP TABLE "users"
+ SQL (1.0ms) CREATE TABLE "users" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255)) 
+ SQL (0.3ms)  SELECT name
+ FROM sqlite_master
+ WHERE type = 'table' AND NOT name = 'sqlite_sequence'
+
+ SQL (1.0ms) DROP TABLE "posts"
+ SQL (0.9ms) CREATE TABLE "posts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "user_id" varchar(255)) 
+ SQL (0.2ms)  SELECT name
+ FROM sqlite_master
+ WHERE type = 'table' AND NOT name = 'sqlite_sequence'
+
+ SQL (0.1ms) SELECT version FROM "schema_migrations"
+ ExistentialTest::User Create (0.3ms) INSERT INTO "users" ("name") VALUES('fred')
+ ExistentialTest::User Create (0.7ms) INSERT INTO "users" ("name") VALUES('bob')
+ ExistentialTest::User Create (0.3ms) INSERT INTO "users" ("name") VALUES('fred')
+ ExistentialTest::User Create (0.3ms) INSERT INTO "users" ("name") VALUES('bob')
+ SQL (0.2ms) select sqlite_version(*)
+ SQL (0.4ms)  SELECT name
+ FROM sqlite_master
+ WHERE type = 'table' AND NOT name = 'sqlite_sequence'
+
+ SQL (1.4ms) DROP TABLE "users"
+ SQL (1.0ms) CREATE TABLE "users" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255)) 
+ SQL (0.2ms)  SELECT name
+ FROM sqlite_master
+ WHERE type = 'table' AND NOT name = 'sqlite_sequence'
+
+ SQL (0.9ms) DROP TABLE "posts"
+ SQL (0.9ms) CREATE TABLE "posts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "user_id" varchar(255)) 
+ SQL (0.2ms)  SELECT name
+ FROM sqlite_master
+ WHERE type = 'table' AND NOT name = 'sqlite_sequence'
+
+ SQL (0.1ms) SELECT version FROM "schema_migrations"
+ ExistentialTest::User Create (0.3ms) INSERT INTO "users" ("name") VALUES('fred')
+ ExistentialTest::User Create (0.4ms) INSERT INTO "users" ("name") VALUES('bob')
+ ExistentialTest::Post Create (0.4ms) INSERT INTO "posts" ("name", "user_id") VALUES('lolz', 2)
+ ExistentialTest::User Create (0.3ms) INSERT INTO "users" ("name") VALUES('fred')
+ ExistentialTest::User Create (0.2ms) INSERT INTO "users" ("name") VALUES('bob')
+ ExistentialTest::Post Create (0.2ms) INSERT INTO "posts" ("name", "user_id") VALUES('lolz', 4)
+ ExistentialTest::User Load (0.3ms) SELECT * FROM "users" 
+ SQL (0.2ms) select sqlite_version(*)
+ SQL (0.3ms)  SELECT name
+ FROM sqlite_master
+ WHERE type = 'table' AND NOT name = 'sqlite_sequence'
+
+ SQL (1.5ms) DROP TABLE "users"
+ SQL (0.9ms) CREATE TABLE "users" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255)) 
+ SQL (0.3ms)  SELECT name
+ FROM sqlite_master
+ WHERE type = 'table' AND NOT name = 'sqlite_sequence'
+
+ SQL (1.0ms) DROP TABLE "posts"
+ SQL (0.9ms) CREATE TABLE "posts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "user_id" varchar(255)) 
+ SQL (0.2ms)  SELECT name
+ FROM sqlite_master
+ WHERE type = 'table' AND NOT name = 'sqlite_sequence'
+
+ SQL (0.1ms) SELECT version FROM "schema_migrations"
+ ExistentialTest::User Create (0.4ms) INSERT INTO "users" ("name") VALUES('fred')
+ ExistentialTest::User Create (0.5ms) INSERT INTO "users" ("name") VALUES('bob')
+ ExistentialTest::Post Create (0.4ms) INSERT INTO "posts" ("name", "user_id") VALUES('lolz', 2)
View
BIN test/existential_plugin.sqlite3
Binary file not shown.
View
15 test/existential_test.rb
@@ -19,20 +19,13 @@ def allows_edit_for?(user)
end
def setup
- User.destroy_all
- Post.destroy_all
- @user = User.create(:name => "fred")
- @other_guy = User.create(:name => "bob")
- @post = Post.create(:name => "lolz", :user_id => @user.id)
- end
-
- def test_schema_loaded_correctly
- assert_equal 2, User.all.length
- assert_equal 1, Post.all.length
+ @fred = User.create(:name => "fred")
+ @bob = User.create(:name => "bob")
+ @post = Post.create(:name => "lolz", :user_id => @bob.id)
end
def test_post_authorization
- assert_false @fred.can?(:edit, @post)
+ assert !@fred.can?(:edit, @post)
assert @bob.can?(:edit, @post)
end

0 comments on commit 256e5cb

Please sign in to comment.