Guest User

Untitled

a guest
Feb 20th, 2018
68
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.48 KB | None | 0 0
  1. Index: C:/Projects/workspace/rails/activerecord/test/base_test.rb
  2. ===================================================================
  3. --- C:/Projects/workspace/rails/activerecord/test/base_test.rb (revision 5212)
  4. +++ C:/Projects/workspace/rails/activerecord/test/base_test.rb (working copy)
  5. @@ -26,6 +26,7 @@
  6. class Computer < ActiveRecord::Base; end
  7. class NonExistentTable < ActiveRecord::Base; end
  8. class TestOracleDefault < ActiveRecord::Base; end
  9. +class ColumnlessClass < ActiveRecord::Base; end
  10.  
  11. class LoosePerson < ActiveRecord::Base
  12. attr_protected :credit_rating, :administrator
  13. @@ -150,7 +151,12 @@
  14. topic = Topic.new(:title => "New Topic")
  15. assert topic.save!
  16. end
  17. -
  18. +
  19. + def test_save_columnless
  20. + record = ColumnlessClass.new
  21. + assert record.save
  22. + end
  23. +
  24. def test_hashes_not_mangled
  25. new_topic = { :title => "New Topic" }
  26. new_topic_values = { :title => "AnotherTopic" }
  27. Index: C:/Projects/workspace/rails/activerecord/test/fixtures/db_definitions/sqlite.sql
  28. ===================================================================
  29. --- C:/Projects/workspace/rails/activerecord/test/fixtures/db_definitions/sqlite.sql (revision 5212)
  30. +++ C:/Projects/workspace/rails/activerecord/test/fixtures/db_definitions/sqlite.sql (working copy)
  31. @@ -1,3 +1,7 @@
  32. +CREATE TABLE 'columnless_classes' (
  33. + 'id' INTEGER PRIMARY KEY NOT NULL
  34. +);
  35. +
  36. CREATE TABLE 'accounts' (
  37. 'id' INTEGER PRIMARY KEY NOT NULL,
  38. 'firm_id' INTEGER DEFAULT NULL,
Add Comment
Please, Sign In to add comment