From 88ebd14799123d69c171cc2d61d1648f1fbedc47 Mon Sep 17 00:00:00 2001 From: Raphael Date: Tue, 18 Jan 2011 14:53:46 -0800 Subject: [PATCH] Fixture builder working, need to make specs not require a clean db --- spec/fixtures/aspect_memberships.yml | 16 ++-- spec/fixtures/aspects.yml | 18 ++-- spec/fixtures/contacts.yml | 32 +++---- spec/fixtures/people.yml | 78 ++++++++--------- spec/fixtures/profiles.yml | 72 ++++++++-------- spec/fixtures/users.yml | 114 ++++++++++++------------- spec/lib/diaspora/parser_spec.rb | 10 +-- spec/models/jobs/receive_local_spec.rb | 8 +- spec/spec_helper.rb | 3 +- spec/support/fixture_builder.rb | 2 +- 10 files changed, 177 insertions(+), 176 deletions(-) diff --git a/spec/fixtures/aspect_memberships.yml b/spec/fixtures/aspect_memberships.yml index 4a5f858e3..e2d5d3eb4 100644 --- a/spec/fixtures/aspect_memberships.yml +++ b/spec/fixtures/aspect_memberships.yml @@ -1,25 +1,25 @@ --- aspect_memberships_002: - created_at: 2011-01-18 18:44:07 Z + created_at: 2011-01-18 22:45:18 Z aspect_id: 1 - updated_at: 2011-01-18 18:44:07 Z + updated_at: 2011-01-18 22:45:18 Z contact_id: 2 id: 2 aspect_memberships_003: - created_at: 2011-01-18 18:44:07 Z + created_at: 2011-01-18 22:45:18 Z aspect_id: 2 - updated_at: 2011-01-18 18:44:07 Z + updated_at: 2011-01-18 22:45:18 Z contact_id: 3 id: 3 aspect_memberships_004: - created_at: 2011-01-18 18:44:07 Z + created_at: 2011-01-18 22:45:18 Z aspect_id: 3 - updated_at: 2011-01-18 18:44:07 Z + updated_at: 2011-01-18 22:45:18 Z contact_id: 4 id: 4 aspect_memberships_001: - created_at: 2011-01-18 18:44:07 Z + created_at: 2011-01-18 22:45:18 Z aspect_id: 2 - updated_at: 2011-01-18 18:44:07 Z + updated_at: 2011-01-18 22:45:18 Z contact_id: 1 id: 1 diff --git a/spec/fixtures/aspects.yml b/spec/fixtures/aspects.yml index 08ba5e30c..5322d4d24 100644 --- a/spec/fixtures/aspects.yml +++ b/spec/fixtures/aspects.yml @@ -2,24 +2,24 @@ generic_1: name: generic mongo_id: - created_at: 2011-01-18 18:44:06 Z - updated_at: 2011-01-18 18:44:07 Z + created_at: 2011-01-18 22:45:17 Z + updated_at: 2011-01-18 22:45:17 Z id: 2 user_mongo_id: - user_id: 4 + user_id: 2 generic_2: name: generic mongo_id: - created_at: 2011-01-18 18:44:07 Z - updated_at: 2011-01-18 18:44:07 Z + created_at: 2011-01-18 22:45:17 Z + updated_at: 2011-01-18 22:45:18 Z id: 3 user_mongo_id: - user_id: 5 + user_id: 3 generic: name: generic mongo_id: - created_at: 2011-01-18 18:44:06 Z - updated_at: 2011-01-18 18:44:06 Z + created_at: 2011-01-18 22:45:17 Z + updated_at: 2011-01-18 22:45:17 Z id: 1 user_mongo_id: - user_id: 3 + user_id: 1 diff --git a/spec/fixtures/contacts.yml b/spec/fixtures/contacts.yml index 9c788d0ad..402513b89 100644 --- a/spec/fixtures/contacts.yml +++ b/spec/fixtures/contacts.yml @@ -2,32 +2,32 @@ contacts_003: pending: false mongo_id: - created_at: 2011-01-18 18:44:07 Z - updated_at: 2011-01-18 18:44:07 Z + created_at: 2011-01-18 22:45:18 Z + updated_at: 2011-01-18 22:45:18 Z id: 3 - user_id: 4 - person_id: 5 + user_id: 2 + person_id: 3 contacts_004: pending: false mongo_id: - created_at: 2011-01-18 18:44:07 Z - updated_at: 2011-01-18 18:44:07 Z + created_at: 2011-01-18 22:45:18 Z + updated_at: 2011-01-18 22:45:18 Z id: 4 - user_id: 5 - person_id: 4 + user_id: 3 + person_id: 2 contacts_001: pending: false mongo_id: - created_at: 2011-01-18 18:44:07 Z - updated_at: 2011-01-18 18:44:07 Z + created_at: 2011-01-18 22:45:18 Z + updated_at: 2011-01-18 22:45:18 Z id: 1 - user_id: 4 - person_id: 3 + user_id: 2 + person_id: 1 contacts_002: pending: false mongo_id: - created_at: 2011-01-18 18:44:07 Z - updated_at: 2011-01-18 18:44:07 Z + created_at: 2011-01-18 22:45:18 Z + updated_at: 2011-01-18 22:45:18 Z id: 2 - user_id: 3 - person_id: 4 + user_id: 1 + person_id: 2 diff --git a/spec/fixtures/people.yml b/spec/fixtures/people.yml index 95b3f2321..c0694a984 100644 --- a/spec/fixtures/people.yml +++ b/spec/fixtures/people.yml @@ -1,49 +1,49 @@ --- people_001: mongo_id: - created_at: 2011-01-18 18:44:06 Z - guid: 89e32c010f204d98 - updated_at: 2011-01-18 18:44:06 Z - url: http://google-1d915c9.com/ + created_at: 2011-01-18 22:45:17 Z + guid: a26933a9a45ac375 + updated_at: 2011-01-18 22:45:17 Z + url: http://google-1eac19e.com/ serialized_public_key: | -----BEGIN RSA PUBLIC KEY----- - MIGJAoGBAPEQ08ZWNCiEh/fV/aQ19fMGdeK2r0ns+MB8kcbrkduTqvQ/c/RFkhJX - KWti8QomQVudx30mKMuD+r8XY48xw3H3XQDK2rtpFQmgJ4f/Wj4E6yFJo5pC7OL9 - 253WWqLGAJOJy9IxF76Mlo9Qazm7Z7aj1zp5kUXYusge2XAfkb0fAgMBAAE= + MIGJAoGBAKw1mMlExMJ9k5Q1E1EEPpmhqbFHdnxX7V5RIMKCwAgOq++SrzXlJfKv + nP11IK3CFZ1E+G/8H/MBf1insc9wQrjKQLlEN4UbeiPA2ahqAPApJ7PpyQBlaN4f + NjQyEm3M1QgdemiBzVYUZOU1gfkKpDoPPMIFgqKkl8O6ZJe6pcrfAgMBAAE= + -----END RSA PUBLIC KEY----- + + owner_id: 1 + id: 1 + diaspora_handle: alice@example.org +people_002: + mongo_id: + created_at: 2011-01-18 22:45:17 Z + guid: d04ada2056f7202c + updated_at: 2011-01-18 22:45:17 Z + url: http://google-2542fc1.com/ + serialized_public_key: | + -----BEGIN RSA PUBLIC KEY----- + MIGJAoGBAKw1mMlExMJ9k5Q1E1EEPpmhqbFHdnxX7V5RIMKCwAgOq++SrzXlJfKv + nP11IK3CFZ1E+G/8H/MBf1insc9wQrjKQLlEN4UbeiPA2ahqAPApJ7PpyQBlaN4f + NjQyEm3M1QgdemiBzVYUZOU1gfkKpDoPPMIFgqKkl8O6ZJe6pcrfAgMBAAE= + -----END RSA PUBLIC KEY----- + + owner_id: 2 + id: 2 + diaspora_handle: bob@example.org +people_003: + mongo_id: + created_at: 2011-01-18 22:45:18 Z + guid: 03637d1d38abd29d + updated_at: 2011-01-18 22:45:18 Z + url: http://google-3a77e5a.com/ + serialized_public_key: | + -----BEGIN RSA PUBLIC KEY----- + MIGJAoGBAKw1mMlExMJ9k5Q1E1EEPpmhqbFHdnxX7V5RIMKCwAgOq++SrzXlJfKv + nP11IK3CFZ1E+G/8H/MBf1insc9wQrjKQLlEN4UbeiPA2ahqAPApJ7PpyQBlaN4f + NjQyEm3M1QgdemiBzVYUZOU1gfkKpDoPPMIFgqKkl8O6ZJe6pcrfAgMBAAE= -----END RSA PUBLIC KEY----- owner_id: 3 id: 3 - diaspora_handle: alice@example.org -people_002: - mongo_id: - created_at: 2011-01-18 18:44:07 Z - guid: 5d3d9ce10a10eafe - updated_at: 2011-01-18 18:44:07 Z - url: http://google-245c017.com/ - serialized_public_key: | - -----BEGIN RSA PUBLIC KEY----- - MIGJAoGBAPEQ08ZWNCiEh/fV/aQ19fMGdeK2r0ns+MB8kcbrkduTqvQ/c/RFkhJX - KWti8QomQVudx30mKMuD+r8XY48xw3H3XQDK2rtpFQmgJ4f/Wj4E6yFJo5pC7OL9 - 253WWqLGAJOJy9IxF76Mlo9Qazm7Z7aj1zp5kUXYusge2XAfkb0fAgMBAAE= - -----END RSA PUBLIC KEY----- - - owner_id: 4 - id: 4 - diaspora_handle: bob@example.org -people_003: - mongo_id: - created_at: 2011-01-18 18:44:07 Z - guid: 742a7d253debf2d6 - updated_at: 2011-01-18 18:44:07 Z - url: http://google-330296d.com/ - serialized_public_key: | - -----BEGIN RSA PUBLIC KEY----- - MIGJAoGBAPEQ08ZWNCiEh/fV/aQ19fMGdeK2r0ns+MB8kcbrkduTqvQ/c/RFkhJX - KWti8QomQVudx30mKMuD+r8XY48xw3H3XQDK2rtpFQmgJ4f/Wj4E6yFJo5pC7OL9 - 253WWqLGAJOJy9IxF76Mlo9Qazm7Z7aj1zp5kUXYusge2XAfkb0fAgMBAAE= - -----END RSA PUBLIC KEY----- - - owner_id: 5 - id: 5 diaspora_handle: eve@example.org diff --git a/spec/fixtures/profiles.yml b/spec/fixtures/profiles.yml index 97cf135d7..6517a4f44 100644 --- a/spec/fixtures/profiles.yml +++ b/spec/fixtures/profiles.yml @@ -2,48 +2,48 @@ profiles_001: image_url_medium: mongo_id: - created_at: 2011-01-18 18:44:06 Z + created_at: 2011-01-18 22:45:17 Z searchable: true image_url: - updated_at: 2011-01-18 18:44:06 Z + updated_at: 2011-01-18 22:45:17 Z + id: 1 + gender: + diaspora_handle: + person_id: 1 + last_name: Grimm12900f1 + birthday: + image_url_small: + bio: + first_name: Robert1459630 +profiles_002: + image_url_medium: + mongo_id: + created_at: 2011-01-18 22:45:17 Z + searchable: true + image_url: + updated_at: 2011-01-18 22:45:17 Z + id: 2 + gender: + diaspora_handle: + person_id: 2 + last_name: Grimm2f63d16 + birthday: + image_url_small: + bio: + first_name: Robert26c81a0 +profiles_003: + image_url_medium: + mongo_id: + created_at: 2011-01-18 22:45:17 Z + searchable: true + image_url: + updated_at: 2011-01-18 22:45:18 Z id: 3 gender: diaspora_handle: person_id: 3 - last_name: Grimm1a80b30 + last_name: Grimm3f266bd birthday: image_url_small: bio: - first_name: Robert19c3152 -profiles_002: - image_url_medium: - mongo_id: - created_at: 2011-01-18 18:44:06 Z - searchable: true - image_url: - updated_at: 2011-01-18 18:44:07 Z - id: 4 - gender: - diaspora_handle: - person_id: 4 - last_name: Grimm295050b - birthday: - image_url_small: - bio: - first_name: Robert2909f07 -profiles_003: - image_url_medium: - mongo_id: - created_at: 2011-01-18 18:44:07 Z - searchable: true - image_url: - updated_at: 2011-01-18 18:44:07 Z - id: 5 - gender: - diaspora_handle: - person_id: 5 - last_name: Grimm3c16b10 - birthday: - image_url_small: - bio: - first_name: Robert3574823 + first_name: Robert3938df3 diff --git a/spec/fixtures/users.yml b/spec/fixtures/users.yml index 02648fdf6..ddea41d5e 100644 --- a/spec/fixtures/users.yml +++ b/spec/fixtures/users.yml @@ -1,35 +1,35 @@ --- alice: - encrypted_password: $2a$10$10wn.2788it4RyLvmIqap.zJfK8kAoM7IVsD6l0vPyzxQY7aH4m4m + encrypted_password: $2a$10$xbdc6ex5521gL/zGLbweNuF9echW6Q74L8sNu.Cug1e9fjBo2AZV6 serialized_private_key: | -----BEGIN RSA PRIVATE KEY----- - MIICXQIBAAKBgQDxENPGVjQohIf31f2kNfXzBnXitq9J7PjAfJHG65Hbk6r0P3P0 - RZISVylrYvEKJkFbncd9JijLg/q/F2OPMcNx910Aytq7aRUJoCeH/1o+BOshSaOa - Quzi/dud1lqixgCTicvSMRe+jJaPUGs5u2e2o9c6eZFF2LrIHtlwH5G9HwIDAQAB - AoGAIk7BxPVZwPZzn1ruGSOw2CBwQI69TakTEdnoqUW3YWeXqeEp8HbCPif3dhgD - s+0T2iUPUglPPv+OfQmoGqX7aYMTJOIrFPxYkBKkbfW8ZoNy/GHibblLJscJ54iF - iJcGL6bBGga36QSA+aw29N7+qtMQdebsBHsj6qZpFxS+N3ECQQD6/t4eX8BdHKoB - IfWpZV1JETyZAE+sGiUUF3QgyE3C7v5o99xtEZ6jvRMcwURf/3Dw3FeATSAgVC0Q - LReupEHZAkEA9d9GkOyioKoAEmVfjc08va0otSv9OR81MYWfXRuCliMMQC3wHdU4 - kr912zY2FDHLZtxy12YImDG/hpHYbpYjtwJBALvoIxJKTRFobD381pXDNVuGc/93 - pC4MRMYN6PrB+rV9hym+pl9hWYrr+msEpdPYwQ0RaNC87NhHLJV3rMsqXcECQFC8 - UF+mVICNUhi4UPgvPJLMGWHkX/Ix3TW1uu7H6cmDGLK6Yu5o5XrKg9jHpFpdP303 - Rj6Usp3HOCzoFzm482ECQQCYJ01wP0IsjFruXqhlclYxk/1cKuRt5NmhkNflJSWl - BrEFy9v3tTGVI6AAR1S7cYWFEyOj0OICMOqGHU72GIIv + MIICXgIBAAKBgQCsNZjJRMTCfZOUNRNRBD6ZoamxR3Z8V+1eUSDCgsAIDqvvkq81 + 5SXyr5z9dSCtwhWdRPhv/B/zAX9Yp7HPcEK4ykC5RDeFG3ojwNmoagDwKSez6ckA + ZWjeHzY0MhJtzNUIHXpogc1WFGTlNYH5CqQ6DzzCBYKipJfDumSXuqXK3wIDAQAB + AoGBAJt8pSANBG7q/WYS6gb7gx4p9lKHyLaKmVrQe3jEn2hm/t0IH0TVSocuAtxi + dggNNoDSdlJ+XcaGspm0h/pZTROa05er055twa4JxdwFTxGpv6pBgV56TXugzsYD + fF+pQQmfSl0TZ7nTL1DHWlGufrBUyOQ0cevcEvwlzUCdkhHpAkEA1+QVzevb0rCf + jf4GOG/D9PrgJBPtkhglxm81deQntfkfaNZLkMGEds41REijiEoftOPEdHt7Porq + sQuGdCTZ0wJBAMwz/InrGxlTxLky1dcZd+2DJCQks2OFBnyzf0kamN7KoEBv0K/w + yX/1C0JFu6h/6UTe9E+k4Xfnzhm+K9byd0UCQQDPlvDkbbuU7uKtHSqMD+Qj5yup + ZUQWK4P/N6X3MyiAEQkDvLMygPHHb2bGvvYIMgYk4LJhsu6B5//dt5BUk66jAkBy + aSIyZ+6r9xo+pXPYa6WdBqAGPCXiOZMT5UIIxIUoNqEo2T00hpVvQu1G+WkWFGyv + MLfzs668Dr2UAM/xQ7J9AkEAoR9VaZemxV8thA+w8EeIeBWjAjFY2kZJpPJIQIEv + VtOzYCHm0WXjuyyKHY9AOPLEO9RB4XXW0qmtE28kUCMXGw== -----END RSA PRIVATE KEY----- mongo_id: - created_at: 2011-01-18 18:44:06 Z - updated_at: 2011-01-18 18:44:06 Z + created_at: 2011-01-18 22:45:17 Z + updated_at: 2011-01-18 22:45:17 Z last_sign_in_ip: invites: 0 username: alice last_sign_in_at: language: en sign_in_count: 0 - id: 3 + id: 1 disable_mail: false - password_salt: $2a$10$10wn.2788it4RyLvmIqap. + password_salt: $2a$10$xbdc6ex5521gL/zGLbweNu reset_password_token: remember_token: current_sign_in_ip: @@ -38,38 +38,38 @@ alice: invitation_sent_at: invitation_token: getting_started: true - email: bob1f866f6@pivotallabs.com + email: bob1810d2e@pivotallabs.com eve: - encrypted_password: $2a$10$uDyK3VOraaekpPhbr8dPjuGqdshJlt9vSRUWvh9R1obnqqMgp60ry + encrypted_password: $2a$10$MunrAlmGUbgmhg0gYo/cqOPm5ObMjHA/rWsSVZiKD1ue0yFQ2AGbO serialized_private_key: | -----BEGIN RSA PRIVATE KEY----- - MIICXQIBAAKBgQDxENPGVjQohIf31f2kNfXzBnXitq9J7PjAfJHG65Hbk6r0P3P0 - RZISVylrYvEKJkFbncd9JijLg/q/F2OPMcNx910Aytq7aRUJoCeH/1o+BOshSaOa - Quzi/dud1lqixgCTicvSMRe+jJaPUGs5u2e2o9c6eZFF2LrIHtlwH5G9HwIDAQAB - AoGAIk7BxPVZwPZzn1ruGSOw2CBwQI69TakTEdnoqUW3YWeXqeEp8HbCPif3dhgD - s+0T2iUPUglPPv+OfQmoGqX7aYMTJOIrFPxYkBKkbfW8ZoNy/GHibblLJscJ54iF - iJcGL6bBGga36QSA+aw29N7+qtMQdebsBHsj6qZpFxS+N3ECQQD6/t4eX8BdHKoB - IfWpZV1JETyZAE+sGiUUF3QgyE3C7v5o99xtEZ6jvRMcwURf/3Dw3FeATSAgVC0Q - LReupEHZAkEA9d9GkOyioKoAEmVfjc08va0otSv9OR81MYWfXRuCliMMQC3wHdU4 - kr912zY2FDHLZtxy12YImDG/hpHYbpYjtwJBALvoIxJKTRFobD381pXDNVuGc/93 - pC4MRMYN6PrB+rV9hym+pl9hWYrr+msEpdPYwQ0RaNC87NhHLJV3rMsqXcECQFC8 - UF+mVICNUhi4UPgvPJLMGWHkX/Ix3TW1uu7H6cmDGLK6Yu5o5XrKg9jHpFpdP303 - Rj6Usp3HOCzoFzm482ECQQCYJ01wP0IsjFruXqhlclYxk/1cKuRt5NmhkNflJSWl - BrEFy9v3tTGVI6AAR1S7cYWFEyOj0OICMOqGHU72GIIv + MIICXgIBAAKBgQCsNZjJRMTCfZOUNRNRBD6ZoamxR3Z8V+1eUSDCgsAIDqvvkq81 + 5SXyr5z9dSCtwhWdRPhv/B/zAX9Yp7HPcEK4ykC5RDeFG3ojwNmoagDwKSez6ckA + ZWjeHzY0MhJtzNUIHXpogc1WFGTlNYH5CqQ6DzzCBYKipJfDumSXuqXK3wIDAQAB + AoGBAJt8pSANBG7q/WYS6gb7gx4p9lKHyLaKmVrQe3jEn2hm/t0IH0TVSocuAtxi + dggNNoDSdlJ+XcaGspm0h/pZTROa05er055twa4JxdwFTxGpv6pBgV56TXugzsYD + fF+pQQmfSl0TZ7nTL1DHWlGufrBUyOQ0cevcEvwlzUCdkhHpAkEA1+QVzevb0rCf + jf4GOG/D9PrgJBPtkhglxm81deQntfkfaNZLkMGEds41REijiEoftOPEdHt7Porq + sQuGdCTZ0wJBAMwz/InrGxlTxLky1dcZd+2DJCQks2OFBnyzf0kamN7KoEBv0K/w + yX/1C0JFu6h/6UTe9E+k4Xfnzhm+K9byd0UCQQDPlvDkbbuU7uKtHSqMD+Qj5yup + ZUQWK4P/N6X3MyiAEQkDvLMygPHHb2bGvvYIMgYk4LJhsu6B5//dt5BUk66jAkBy + aSIyZ+6r9xo+pXPYa6WdBqAGPCXiOZMT5UIIxIUoNqEo2T00hpVvQu1G+WkWFGyv + MLfzs668Dr2UAM/xQ7J9AkEAoR9VaZemxV8thA+w8EeIeBWjAjFY2kZJpPJIQIEv + VtOzYCHm0WXjuyyKHY9AOPLEO9RB4XXW0qmtE28kUCMXGw== -----END RSA PRIVATE KEY----- mongo_id: - created_at: 2011-01-18 18:44:07 Z - updated_at: 2011-01-18 18:44:07 Z + created_at: 2011-01-18 22:45:18 Z + updated_at: 2011-01-18 22:45:18 Z last_sign_in_ip: invites: 0 username: eve last_sign_in_at: language: en sign_in_count: 0 - id: 5 + id: 3 disable_mail: false - password_salt: $2a$10$uDyK3VOraaekpPhbr8dPju + password_salt: $2a$10$MunrAlmGUbgmhg0gYo/cqO reset_password_token: remember_token: current_sign_in_ip: @@ -78,38 +78,38 @@ eve: invitation_sent_at: invitation_token: getting_started: true - email: bob3884c35@pivotallabs.com + email: bob3d6acb8@pivotallabs.com bob: - encrypted_password: $2a$10$YXDxHoVUIaIgyS405RS3NeenGVRrexiZei0.7l.LbyLDf.YqtCvfS + encrypted_password: $2a$10$O07zBbVmaUpAyLo6nBmOAur5BcrXLmb5kKRrx2eX04qo3Bi0uXWfu serialized_private_key: | -----BEGIN RSA PRIVATE KEY----- - MIICXQIBAAKBgQDxENPGVjQohIf31f2kNfXzBnXitq9J7PjAfJHG65Hbk6r0P3P0 - RZISVylrYvEKJkFbncd9JijLg/q/F2OPMcNx910Aytq7aRUJoCeH/1o+BOshSaOa - Quzi/dud1lqixgCTicvSMRe+jJaPUGs5u2e2o9c6eZFF2LrIHtlwH5G9HwIDAQAB - AoGAIk7BxPVZwPZzn1ruGSOw2CBwQI69TakTEdnoqUW3YWeXqeEp8HbCPif3dhgD - s+0T2iUPUglPPv+OfQmoGqX7aYMTJOIrFPxYkBKkbfW8ZoNy/GHibblLJscJ54iF - iJcGL6bBGga36QSA+aw29N7+qtMQdebsBHsj6qZpFxS+N3ECQQD6/t4eX8BdHKoB - IfWpZV1JETyZAE+sGiUUF3QgyE3C7v5o99xtEZ6jvRMcwURf/3Dw3FeATSAgVC0Q - LReupEHZAkEA9d9GkOyioKoAEmVfjc08va0otSv9OR81MYWfXRuCliMMQC3wHdU4 - kr912zY2FDHLZtxy12YImDG/hpHYbpYjtwJBALvoIxJKTRFobD381pXDNVuGc/93 - pC4MRMYN6PrB+rV9hym+pl9hWYrr+msEpdPYwQ0RaNC87NhHLJV3rMsqXcECQFC8 - UF+mVICNUhi4UPgvPJLMGWHkX/Ix3TW1uu7H6cmDGLK6Yu5o5XrKg9jHpFpdP303 - Rj6Usp3HOCzoFzm482ECQQCYJ01wP0IsjFruXqhlclYxk/1cKuRt5NmhkNflJSWl - BrEFy9v3tTGVI6AAR1S7cYWFEyOj0OICMOqGHU72GIIv + MIICXgIBAAKBgQCsNZjJRMTCfZOUNRNRBD6ZoamxR3Z8V+1eUSDCgsAIDqvvkq81 + 5SXyr5z9dSCtwhWdRPhv/B/zAX9Yp7HPcEK4ykC5RDeFG3ojwNmoagDwKSez6ckA + ZWjeHzY0MhJtzNUIHXpogc1WFGTlNYH5CqQ6DzzCBYKipJfDumSXuqXK3wIDAQAB + AoGBAJt8pSANBG7q/WYS6gb7gx4p9lKHyLaKmVrQe3jEn2hm/t0IH0TVSocuAtxi + dggNNoDSdlJ+XcaGspm0h/pZTROa05er055twa4JxdwFTxGpv6pBgV56TXugzsYD + fF+pQQmfSl0TZ7nTL1DHWlGufrBUyOQ0cevcEvwlzUCdkhHpAkEA1+QVzevb0rCf + jf4GOG/D9PrgJBPtkhglxm81deQntfkfaNZLkMGEds41REijiEoftOPEdHt7Porq + sQuGdCTZ0wJBAMwz/InrGxlTxLky1dcZd+2DJCQks2OFBnyzf0kamN7KoEBv0K/w + yX/1C0JFu6h/6UTe9E+k4Xfnzhm+K9byd0UCQQDPlvDkbbuU7uKtHSqMD+Qj5yup + ZUQWK4P/N6X3MyiAEQkDvLMygPHHb2bGvvYIMgYk4LJhsu6B5//dt5BUk66jAkBy + aSIyZ+6r9xo+pXPYa6WdBqAGPCXiOZMT5UIIxIUoNqEo2T00hpVvQu1G+WkWFGyv + MLfzs668Dr2UAM/xQ7J9AkEAoR9VaZemxV8thA+w8EeIeBWjAjFY2kZJpPJIQIEv + VtOzYCHm0WXjuyyKHY9AOPLEO9RB4XXW0qmtE28kUCMXGw== -----END RSA PRIVATE KEY----- mongo_id: - created_at: 2011-01-18 18:44:07 Z - updated_at: 2011-01-18 18:44:07 Z + created_at: 2011-01-18 22:45:17 Z + updated_at: 2011-01-18 22:45:17 Z last_sign_in_ip: invites: 0 username: bob last_sign_in_at: language: en sign_in_count: 0 - id: 4 + id: 2 disable_mail: false - password_salt: $2a$10$YXDxHoVUIaIgyS405RS3Ne + password_salt: $2a$10$O07zBbVmaUpAyLo6nBmOAu reset_password_token: remember_token: current_sign_in_ip: @@ -118,4 +118,4 @@ bob: invitation_sent_at: invitation_token: getting_started: true - email: bob25202ed@pivotallabs.com + email: bob2532cbe@pivotallabs.com diff --git a/spec/lib/diaspora/parser_spec.rb b/spec/lib/diaspora/parser_spec.rb index 2cab417bb..8d51a839c 100644 --- a/spec/lib/diaspora/parser_spec.rb +++ b/spec/lib/diaspora/parser_spec.rb @@ -19,7 +19,7 @@ describe Diaspora::Parser do describe "parsing compliant XML object" do it 'should be able to correctly parse comment fields' do - post = @user1.post :status_message, :message => "hello", :to => @aspect.id + post = @user1.post :status_message, :message => "hello", :to => @aspect1.id comment = Factory.create(:comment, :post => post, :person => @person, :diaspora_handle => @person.diaspora_handle, :text => "Freedom!") comment.delete xml = comment.to_diaspora_xml @@ -42,15 +42,15 @@ describe Diaspora::Parser do end it "should activate the Person if I initiated a request to that url" do - @user1.send_contact_request_to(@user3.person, @aspect) + @user1.send_contact_request_to(@user3.person, @aspect1) request = @user3.request_from(@user1.person) fantasy_resque do @user3.accept_and_respond(request.id, @aspect3.id) end @user1.reload - @aspect.reload + @aspect1.reload new_contact = @user1.contact_for(@user3.person) - @aspect.contacts.include?(new_contact).should be true + @aspect1.contacts.include?(new_contact).should be true @user1.contacts.include?(new_contact).should be true end @@ -62,7 +62,7 @@ describe Diaspora::Parser do zord = Postzord::Receiver.new(@user1, :person => @user2.person) zord.parse_and_receive(retraction_xml) }.should change { - @aspect.contacts(true).size }.by(-1) + @aspect1.contacts(true).size }.by(-1) end it 'should marshal a profile for a person' do diff --git a/spec/models/jobs/receive_local_spec.rb b/spec/models/jobs/receive_local_spec.rb index 4ea62d920..ea7e07564 100644 --- a/spec/models/jobs/receive_local_spec.rb +++ b/spec/models/jobs/receive_local_spec.rb @@ -3,7 +3,9 @@ require 'spec_helper' describe Jobs::ReceiveLocal do before do @user1 = alice + @person1 = @user1.person @user2 = eve + @person2 = @user2.person @status = Factory(:status_message) @status_type = @status.class.to_s @@ -16,8 +18,8 @@ describe Jobs::ReceiveLocal do } Person.stub(:find){ |id| - if id == @user2.person.id - @user2.person + if id == @person2.id + @person2 else nil end @@ -36,6 +38,6 @@ describe Jobs::ReceiveLocal do m = mock() m.should_receive(:receive_object) Postzord::Receiver.should_receive(:new).and_return(m) - Jobs::ReceiveLocal.perform(@user1.id, @user2.person.id, @status_type, @status.id) + Jobs::ReceiveLocal.perform(@user1.id, @person2.id, @status_type, @status.id) end end diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb index 45bd7401a..2de47f3f6 100644 --- a/spec/spec_helper.rb +++ b/spec/spec_helper.rb @@ -17,7 +17,6 @@ include HelperMethods # # Requires supporting files with custom matchers and macros, etc, # in ./support/ and its subdirectories. -#DatabaseCleaner.clean_with(:truncation) Dir["#{File.dirname(__FILE__)}/support/**/*.rb"].each {|f| require f} RSpec.configure do |config| @@ -26,7 +25,7 @@ RSpec.configure do |config| config.use_transactional_fixtures = true - config.global_fixtures = :all +# config.global_fixtures = :all config.before(:each) do I18n.locale = :en diff --git a/spec/support/fixture_builder.rb b/spec/support/fixture_builder.rb index 161590b19..658c56615 100644 --- a/spec/support/fixture_builder.rb +++ b/spec/support/fixture_builder.rb @@ -1,7 +1,7 @@ # I usually put this file in spec/support/fixture_builder.rb FixtureBuilder.configure do |fbuilder| # rebuild fixtures automatically when these files change: - fbuilder.files_to_check += Dir["app/models/*.rb", "lib/**/*.rb", "spec/factories/*.rb", "spec/support/fixture_builder.rb"] + fbuilder.files_to_check += Dir["app/models/*.rb", "lib/**/*.rb", "spec/factories/*.rb", "spec/support/fixture_builder.rb"] # now declare objects fbuilder.factory do