Skip to content
This repository
Newer
Older
100644 105 lines (85 sloc) 1.767 kb
d9e385ab »
2011-07-23 consolidate application factories into one file
1 FactoryGirl.define do
b783b116 »
2012-08-03 Make the test suite work again.
2 sequence :email do |n|
3 "user#{n}@example.com"
4 end
5
6 sequence :handle do |n|
7 "handle#{n}"
8 end
9
10 factory :user do
11 email
12 handle
13 password "password"
14 end
15
d9e385ab »
2011-07-23 consolidate application factories into one file
16 factory :dependency do
17 gem_dependency { Gem::Dependency.new(Rubygem.last.name, "1.0.0") }
4f5b6ded »
2011-09-13 use factory_girl 2.0 DSL for parent factories
18 rubygem
d9e385ab »
2011-07-23 consolidate application factories into one file
19 version
20
4f5b6ded »
2011-09-13 use factory_girl 2.0 DSL for parent factories
21 factory :development_dependency do
22 gem_dependency { Gem::Dependency.new(Rubygem.last.name, "1.0.0", :development) }
23 end
d9e385ab »
2011-07-23 consolidate application factories into one file
24
c58b5cde »
2011-09-13 apparently I am inept at factory girl
25 factory :runtime_dependency do
4f5b6ded »
2011-09-13 use factory_girl 2.0 DSL for parent factories
26 end
34b78536 »
2012-01-18 Add ability for a dependency to reference an untracked gem
27
28 factory :unresolved_dependency do
29 gem_dependency { Gem::Dependency.new("unresolved-gem-nothere", "1.0.0") }
30 end
d9e385ab »
2011-07-23 consolidate application factories into one file
31 end
32
33 factory :linkset do
34 home 'http://example.com'
35 wiki 'http://example.com'
36 docs 'http://example.com'
37 mail 'http://example.com'
38 code 'http://example.com'
39 bugs 'http://example.com'
40 end
41
42 factory :ownership do
43 rubygem
44 user
45 end
46
47 factory :rubyforger do
48 email
49 encrypted_password Digest::SHA1.hexdigest("password")
50 end
51
52 factory :subscription do
53 rubygem
54 user
55 end
56
57 sequence :name do |n|
58 "RubyGem#{n}"
59 end
60
61 factory :rubygem do
62 linkset
63 name
64
4f5b6ded »
2011-09-13 use factory_girl 2.0 DSL for parent factories
65 factory :rubygem_with_downloads do
408419b8 »
2012-05-25 Calling after_create is deprecated; use the syntax after(:create) {}
66 after(:create) do |r|
4f5b6ded »
2011-09-13 use factory_girl 2.0 DSL for parent factories
67 $redis[Download.key(r)] = r['downloads']
68 end
d9e385ab »
2011-07-23 consolidate application factories into one file
69 end
70 end
71
72 sequence :number do |n|
73 "0.0.#{n}"
74 end
75
76 factory :version do
77 authors ["Joe User"]
78 built_at 1.day.ago
79 description "Some awesome gem"
80 indexed true
81 number
82 platform "ruby"
83 rubygem
84 end
85
1312f809 »
2012-09-15 Add ability to pull version history out of SQL
86 factory :version_history do
87 day { Time.zone.today.to_s }
88 count 1
89 end
90
d9e385ab »
2011-07-23 consolidate application factories into one file
91 sequence :url do |n|
92 "http://example#{n}.com"
93 end
94
95 factory :web_hook do
96 rubygem
97 url
98 user
99
4f5b6ded »
2011-09-13 use factory_girl 2.0 DSL for parent factories
100 factory :global_web_hook do
101 rubygem nil
102 end
d9e385ab »
2011-07-23 consolidate application factories into one file
103 end
104 end
Something went wrong with that request. Please try again.