title: "undefined method 'name' for false:FalseClass"
body: <p>All functional tests for my object "Line" fail. I don't even know where to start debugging this:</p>
  
  <blockquote>
    <p>21) Error: test_should_update_line(LinesControllerTest):
    NoMethodError: undefined method <code>name' for false:FalseClass
        c:/Ruby193/lib/ruby/gems/1.9.1/gems/factory_girl-4.0.0/lib/factory_girl/decl
    aration/static.rb:11:in</code>=='
        c:/Ruby193/lib/ruby/gems/1.9.1/gems/activerecord-3.2.3/lib/active_record/att
    ribute_methods/write.rb:57:in <code>convert_number_column_value'
        c:/Ruby193/lib/ruby/gems/1.9.1/gems/activerecord-3.2.3/lib/active_record/att
    ribute_methods/write.rb:50:in</code>type_cast_attribute_for_write'
        c:/Ruby193/lib/ruby/gems/1.9.1/gems/activerecord-3.2.3/lib/active_record/att
    ribute_methods/serialization.rb:88:in <code>type_cast_attribute_for_write'
        c:/Ruby193/lib/ruby/gems/1.9.1/gems/activerecord-3.2.3/lib/active_record/att
    ribute_methods/write.rb:38:in</code>write_attribute'
        c:/Ruby193/lib/ruby/gems/1.9.1/gems/activerecord-3.2.3/lib/active_record/att
    ribute_methods/dirty.rb:67:in <code>write_attribute'
        c:/Ruby193/lib/ruby/gems/1.9.1/gems/activerecord-3.2.3/lib/active_record/att
    ribute_methods/write.rb:14:in</code>port='
        c:/Ruby193/lib/ruby/gems/1.9.1/gems/factory_girl-4.0.0/lib/factory_girl/attr
    ibute_assigner.rb:16:in <code>block (2 levels) in object'
        c:/Ruby193/lib/ruby/gems/1.9.1/gems/factory_girl-4.0.0/lib/factory_girl/attr
    ibute_assigner.rb:15:in</code>each'
        c:/Ruby193/lib/ruby/gems/1.9.1/gems/factory_girl-4.0.0/lib/factory_girl/attr
    ibute_assigner.rb:15:in <code>block in object'
        c:/Ruby193/lib/ruby/gems/1.9.1/gems/factory_girl-4.0.0/lib/factory_girl/attr
    ibute_assigner.rb:14:in</code>tap'
        c:/Ruby193/lib/ruby/gems/1.9.1/gems/factory_girl-4.0.0/lib/factory_girl/attr
    ibute_assigner.rb:14:in <code>object'
        c:in</code>object'
        c:/Ruby193/lib/ruby/gems/1.9.1/gems/factory_girl-4.0.0/lib/factory_girl/stra
    tegy/create.rb:9:in <code>result'
        c:/Ruby193/lib/ruby/gems/1.9.1/gems/factory_girl-4.0.0/lib/factory_girl/fact
    ory.rb:42:in</code>run'
        c:/Ruby193/lib/ruby/gems/1.9.1/gems/factory_girl-4.0.0/lib/factory_girl/fact
    ory_runner.rb:23:in <code>block in run'
        c:/Ruby193/lib/ruby/gems/1.9.1/gems/activesupport-3.2.3/lib/active_support/n
    otifications.rb:125:in</code>instrument'
        c:/Ruby193/lib/ruby/gems/1.9.1/gems/factory_girl-4.0.0/lib/factory_girl/fact
    ory_runner.rb:22:in <code>run'
        c:/Ruby193/lib/ruby/gems/1.9.1/gems/factory_girl-4.0.0/lib/factory_girl/stra
    tegy_syntax_method_registrar.rb:19:in</code>block in
    define_singular_strategy_method'</p>
  
  <pre><code>c:/code/vsdb/test/functional/lines_controller_test.rb:5:in `block in &lt;class: LinesControllerTest&gt;'
  c:/Ruby193/lib/ruby/gems/1.9.1/gems/activesupport-3.2.3/lib/active_support/c
  </code></pre>
    
    <p>allbacks.rb:462:in <code>_run__987382823__setup__855471168__callbacks'
        c:/Ruby193/lib/ruby/gems/1.9.1/gems/activesupport-3.2.3/lib/active_support/c
    allbacks.rb:405:in</code>__run_callback'
        c:/Ruby193/lib/ruby/gems/1.9.1/gems/activesupport-3.2.3/lib/active_support/c
    allbacks.rb:385:in <code>_run_setup_callbacks'
        c:/Ruby193/lib/ruby/gems/1.9.1/gems/activesupport-3.2.3/lib/active_support/c
    allbacks.rb:81:in</code>run_callbacks'
        c:/Ruby193/lib/ruby/gems/1.9.1/gems/activesupport-3.2.3/lib/active_support/t
    esting/setup_and_teardown.rb:34:in `run'</p>
  </blockquote>
  
  <p>lines_controller_test.rb:</p>
  
  <blockquote>
    <p>class LinesControllerTest &lt; ActionController::TestCase<br>
        setup do
          @line = FactoryGirl.create(:line)<br>
        end</p>
  
  <pre><code>test "should update line" do
    put :update, id: @line, line: { description: @line.description }
    assert_redirected_to line_path(assigns(:line))   
  end
  </code></pre>
    
    <p>end</p>
  </blockquote>
  
  <p>test_helper.rb:</p>
  
  <blockquote>
    <p>ENV["RAILS_ENV"] = "test" require
    File.expand_path('../../config/environment', <strong>FILE</strong>) require
    'rails/test_help' require 'capybara/rails'</p>
    
    <p>class ActiveSupport::TestCase   # Setup all fixtures in
    test/fixtures/*.(yml|csv) for all tests in alphabetical order.   #   #
    Note: You'll currently still have to declare fixtures explicitly in
    integration tests   # -- they do not yet inherit this setting</p>
    
    <p>def setup
        #all kinds of owners
        @admin = FactoryGirl.create(:owner, iso:true, admin:true)
        @iso = FactoryGirl.create(:owner, iso:true)
        @isa = FactoryGirl.create(:owner)
          #be admin by default
          @controller.stubs(:current_owner).returns(@admin)</p>
  
  <pre><code>#fixtures for compliance rates verification
  @art = FactoryGirl.create(:unit, name: "art", unit_code: "1110000", parent_unit_id: 1100000)   end
  </code></pre>
    
    <p># Add more helper methods to be used by all tests here... end</p>
    
    <p>class ActionDispatch::IntegrationTest     include Capybara::DSL</p>
    
    <p>def teardown        Capybara.reset_sessions!        Capybara.use_default_driver
      end end</p>
  </blockquote>