mileszs (owner)

Revisions

gist: 230045 Download_button fork
public
Public Clone URL: git://gist.github.com/230045.git
Embed All Files: show embed
Text only #
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
586) Error:
test_update_should_fail_if_version_invalid(VersionsControllerTest):
NoMethodError: You have a nil object when you didn't expect it!
The error occurred while evaluating nil.each_pair
    /usr/lib/ruby/gems/1.8/gems/acts_as_ferret-0.4.4/lib/instance_methods.rb:136:in `to_doc'
    /usr/lib/ruby/gems/1.8/gems/acts_as_ferret-0.4.4/lib/instance_methods.rb:128:in `to_doc'
    /usr/lib/ruby/gems/1.8/gems/acts_as_ferret-0.4.4/lib/local_index.rb:106:in `<<'
    /usr/lib/ruby/gems/1.8/gems/acts_as_ferret-0.4.4/lib/instance_methods.rb:100:in `ferret_create'
    lib/user_stamp.rb:19:in `create'
    /usr/lib/ruby/gems/1.8/gems/thoughtbot-factory_girl-1.2.2/lib/factory_girl/proxy/create.rb:5:in `result'
    /usr/lib/ruby/gems/1.8/gems/thoughtbot-factory_girl-1.2.2/lib/factory_girl/factory.rb:293:in `run'
    /usr/lib/ruby/gems/1.8/gems/thoughtbot-factory_girl-1.2.2/lib/factory_girl/factory.rb:237:in `create'
    /usr/lib/ruby/gems/1.8/gems/thoughtbot-factory_girl-1.2.2/lib/factory_girl/proxy/build.rb:21:in `association'
    test/factories.rb:619
    /usr/lib/ruby/gems/1.8/gems/thoughtbot-factory_girl-1.2.2/lib/factory_girl/attribute/dynamic.rb:11:in `call'
    /usr/lib/ruby/gems/1.8/gems/thoughtbot-factory_girl-1.2.2/lib/factory_girl/attribute/dynamic.rb:11:in `add_to'
    /usr/lib/ruby/gems/1.8/gems/thoughtbot-factory_girl-1.2.2/lib/factory_girl/factory.rb:290:in `run'
    /usr/lib/ruby/gems/1.8/gems/thoughtbot-factory_girl-1.2.2/lib/factory_girl/factory.rb:288:in `each'
    /usr/lib/ruby/gems/1.8/gems/thoughtbot-factory_girl-1.2.2/lib/factory_girl/factory.rb:288:in `run'
    /usr/lib/ruby/gems/1.8/gems/thoughtbot-factory_girl-1.2.2/lib/factory_girl/factory.rb:237:in `create'
    /usr/lib/ruby/gems/1.8/gems/thoughtbot-factory_girl-1.2.2/lib/factory_girl/factory.rb:268:in `send'
    /usr/lib/ruby/gems/1.8/gems/thoughtbot-factory_girl-1.2.2/lib/factory_girl/factory.rb:268:in `default_strategy'
    /usr/lib/ruby/gems/1.8/gems/thoughtbot-factory_girl-1.2.2/lib/factory_girl.rb:20:in `Factory'
    /test/functional/versions_controller_test.rb:16:in `setup'
 
####### test/factories.rb
618 Factory.define :software_product do |s|
619 s.vendor { |a| a.association(:org) }
620 s.name 'foo'
621 s.operating_system false
622 end
#######
 
####### test/factories.rb
 1 Factory.sequence(:text_id) { |n| "foo_#{n}" }
 2
 3 Factory.define :org, :class => Organization do |org|
 4 org.name 'nframe'
 5 org.customer_number '60000001'
 6 org.passphrase 'N/A'
 7 org.roa_id 41
 8 org.text_id { Factory.next :text_id }
 9 org.url 'foo'
10 org.notes 'foo'
11 end
#######