#test code
 16   def test_leaf_node
 17     a = Factory.create_curriculum_activity
 18 
 19     deny a.is_leaf_node?
 20 
 21     a.update_attribute(:course_id, 33)
 22     assert a.is_leaf_node?
 23   end


### test results

jonathanwallace@jonathan-wallaces-macbook[5258]~/rollbook% rake test:units TEST="/Users/jonathanwallace/rollbook/test/unit/curriculum_activity_test.rb" TESTOPTS=-ntest_leaf_node
(in /Users/jonathanwallace/rollbook)
Preparing test database
/opt/local/bin/ruby -Ilib:test "/opt/local/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake/rake_test_loader.rb" "/Users/jonathanwallace/rollbook/test/unit/curriculum_activity_test.rb" -ntest_leaf_node
Loaded suite /opt/local/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake/rake_test_loader
Started
E
Finished in 0.185176 seconds.

  1) Error:
test_leaf_node(CurriculumActivityTest):
ArgumentError: wrong number of arguments (3 for 2)
    /Users/jonathanwallace/rollbook/vendor/rails/activerecord/lib/active_record/base.rb:2479:in `attributes_with_quotes'
    /Users/jonathanwallace/rollbook/vendor/rails/activerecord/lib/active_record/base.rb:2479:in `update_without_lock'
    /Users/jonathanwallace/rollbook/vendor/rails/activerecord/lib/active_record/locking/optimistic.rb:70:in `update_without_dirty'
    /Users/jonathanwallace/rollbook/vendor/rails/activerecord/lib/active_record/dirty.rb:137:in `update_without_callbacks'
    /Users/jonathanwallace/rollbook/vendor/rails/activerecord/lib/active_record/callbacks.rb:234:in `update_without_timestamps'
    /Users/jonathanwallace/rollbook/vendor/rails/activerecord/lib/active_record/timestamp.rb:38:in `update'
    /Users/jonathanwallace/rollbook/vendor/rails/activerecord/lib/active_record/base.rb:2472:in `create_or_update_without_callbacks'
    /Users/jonathanwallace/rollbook/vendor/rails/activerecord/lib/active_record/callbacks.rb:207:in `create_or_update'
    /Users/jonathanwallace/rollbook/vendor/rails/activerecord/lib/active_record/base.rb:2200:in `save_without_validation'
    /Users/jonathanwallace/rollbook/vendor/rails/activerecord/lib/active_record/validations.rb:901:in `save_without_dirty'
    /Users/jonathanwallace/rollbook/vendor/rails/activerecord/lib/active_record/dirty.rb:75:in `save_without_transactions'
    /Users/jonathanwallace/rollbook/vendor/rails/activerecord/lib/active_record/transactions.rb:106:in `save'
    /Users/jonathanwallace/rollbook/vendor/rails/activerecord/lib/active_record/connection_adapters/abstract/database_statements.rb:66:in `transaction'
    /Users/jonathanwallace/rollbook/vendor/rails/activerecord/lib/active_record/transactions.rb:79:in `transaction'
    /Users/jonathanwallace/rollbook/vendor/rails/activerecord/lib/active_record/transactions.rb:98:in `transaction'
    /Users/jonathanwallace/rollbook/vendor/rails/activerecord/lib/active_record/transactions.rb:106:in `save'
    /Users/jonathanwallace/rollbook/vendor/rails/activerecord/lib/active_record/transactions.rb:118:in `rollback_active_record_state!'
    /Users/jonathanwallace/rollbook/vendor/rails/activerecord/lib/active_record/transactions.rb:106:in `save'
    /Users/jonathanwallace/rollbook/vendor/rails/activerecord/lib/active_record/validations.rb:922:in `update_attribute'
    /Users/jonathanwallace/rollbook/test/unit/curriculum_activity_test.rb:21:in `test_leaf_node'
    /Users/jonathanwallace/rollbook/vendor/rails/activerecord/lib/../../activesupport/lib/active_support/testing/setup_and_teardown.rb:67:in `__send__'
    /Users/jonathanwallace/rollbook/vendor/rails/activerecord/lib/../../activesupport/lib/active_support/testing/setup_and_teardown.rb:67:in `run'

1 tests, 1 assertions, 0 failures, 1 errors
rake aborted!
Command failed with status (1): [/opt/local/bin/ruby -Ilib:test "/opt/local...]