Skip to content
This repository has been archived by the owner on Dec 26, 2019. It is now read-only.

Commit

Permalink
All factories have been moved to spec/factories directory
Browse files Browse the repository at this point in the history
  • Loading branch information
soulim committed Mar 29, 2011
1 parent 5cbd4fb commit 00eb839
Show file tree
Hide file tree
Showing 8 changed files with 60 additions and 55 deletions.
2 changes: 1 addition & 1 deletion Gemfile
Expand Up @@ -16,7 +16,7 @@ end

group :test do
gem 'rspec'
gem 'factory_girl'
gem 'factory_girl_rails'
end

group :staging, :production do
Expand Down
52 changes: 30 additions & 22 deletions Gemfile.lock
Expand Up @@ -37,11 +37,14 @@ GEM
addressable (2.2.4)
arel (2.0.9)
builder (2.1.2)
cancan (1.5.1)
cancan (1.6.3)
diff-lcs (1.1.2)
erubis (2.6.6)
abstract (>= 1.0.0)
factory_girl (1.3.3)
factory_girl_rails (1.0.1)
factory_girl (~> 1.3)
railties (>= 3.0.0)
faraday (0.5.7)
addressable (~> 2.2.4)
multipart-post (~> 1.1.0)
Expand All @@ -58,46 +61,51 @@ GEM
mime-types (1.16)
multi_json (0.0.5)
multipart-post (1.1.0)
mysql2 (0.2.6)
mysql2 (0.2.7)
net-ldap (0.1.1)
nokogiri (1.4.4)
oa-basic (0.1.6)
oa-basic (0.2.0)
multi_json (~> 0.0.2)
nokogiri (~> 1.4.2)
oa-core (= 0.1.6)
oa-core (= 0.2.0)
rest-client (~> 1.6.0)
oa-core (0.1.6)
oa-core (0.2.0)
rack (~> 1.1)
oa-enterprise (0.1.6)
oa-enterprise (0.2.0)
net-ldap (~> 0.1.1)
nokogiri (~> 1.4.2)
oa-core (= 0.1.6)
oa-core (= 0.2.0)
pyu-ruby-sasl (~> 0.0.3.1)
rubyntlm (~> 0.1.1)
oa-oauth (0.1.6)
oa-more (0.2.0)
multi_json (~> 0.0.2)
oa-core (= 0.2.0)
rest-client (~> 1.6.0)
oa-oauth (0.2.0)
multi_json (~> 0.0.2)
nokogiri (~> 1.4.2)
oa-core (= 0.1.6)
oa-core (= 0.2.0)
oauth (~> 0.4.0)
oauth2 (~> 0.1.0)
oa-openid (0.1.6)
oa-core (= 0.1.6)
oauth2 (~> 0.1.1)
oa-openid (0.2.0)
oa-core (= 0.2.0)
rack-openid (~> 1.2.0)
ruby-openid-apps-discovery
oauth (0.4.4)
oauth2 (0.1.1)
faraday (~> 0.5.0)
multi_json (~> 0.0.4)
omniauth (0.1.6)
oa-basic (= 0.1.6)
oa-core (= 0.1.6)
oa-enterprise (= 0.1.6)
oa-oauth (= 0.1.6)
oa-openid (= 0.1.6)
omniauth (0.2.0)
oa-basic (= 0.2.0)
oa-core (= 0.2.0)
oa-enterprise (= 0.2.0)
oa-more (= 0.2.0)
oa-oauth (= 0.2.0)
oa-openid (= 0.2.0)
polyglot (0.3.1)
pyu-ruby-sasl (0.0.3.2)
rack (1.2.1)
rack-mount (0.6.13)
rack (1.2.2)
rack-mount (0.6.14)
rack (>= 1.0.0)
rack-openid (1.2.0)
rack (>= 1.1.0)
Expand Down Expand Up @@ -148,7 +156,7 @@ GEM
thor (0.14.6)
treetop (1.4.9)
polyglot (>= 0.3.1)
tzinfo (0.3.24)
tzinfo (0.3.25)
will_paginate (3.0.pre2)

PLATFORMS
Expand All @@ -157,7 +165,7 @@ PLATFORMS
DEPENDENCIES
cancan
exception_notification!
factory_girl
factory_girl_rails
jquery-rails
mysql2
omniauth
Expand Down
5 changes: 5 additions & 0 deletions spec/factories/authentication.rb
@@ -0,0 +1,5 @@
Factory.define :authentication do |f|
f.sequence(:uid) { |n| "foo-#{n}" }
f.provider "foo"
f.association :user
end
5 changes: 5 additions & 0 deletions spec/factories/comment.rb
@@ -0,0 +1,5 @@
Factory.define :comment do |f|
f.markdown "**bar**"
f.association :item
f.association :user
end
5 changes: 5 additions & 0 deletions spec/factories/item.rb
@@ -0,0 +1,5 @@
Factory.define :item do |f|
f.title "foo"
f.markdown "**bar**"
f.association :user
end
13 changes: 13 additions & 0 deletions spec/factories/user.rb
@@ -0,0 +1,13 @@
Factory.define :user do |f|
f.name "John 'user' Doe"
f.email "user@example.com"
f.avatar_url ""
f.role 0
end

Factory.define :admin do |f|
f.name "John 'admin' Doe"
f.email "admin@example.com"
f.avatar_url ""
f.role 1
end
2 changes: 1 addition & 1 deletion spec/spec_helper.rb
Expand Up @@ -18,7 +18,7 @@
config.mock_with :rspec

# Remove this line if you're not using ActiveRecord or ActiveRecord fixtures
# config.fixture_path = "#{::Rails.root}/spec/fixtures"
#config.fixture_path = "#{::Rails.root}/spec/fixtures"

# If you're not using ActiveRecord, or you'd prefer not to run each of your
# examples within a transaction, remove the following line or assign false
Expand Down
31 changes: 0 additions & 31 deletions spec/support/factories.rb

This file was deleted.

0 comments on commit 00eb839

Please sign in to comment.