Skip to content
Commits on Jan 5, 2016
  1. Merge pull request #56 from agios/concurrency

    committed
    Fix for concurrency
  2. @agios

    Fix for concurrency

    agios committed
  3. Merge pull request #55 from seanhussey/patch-1

    committed
    Just fixing a small typo.
Commits on Dec 14, 2015
  1. @seanhussey

    Just fixing a small typo.

    seanhussey committed
Commits on Dec 15, 2014
  1. @norman

    Invoke ActiveSupport::Dependencies.clear after test runs

    norman committed
    On Rails 4.1+, depending on the order the tests run in, the Book class
    created during test setup will sometimes be resolved to the same class
    used by a previous test method, even though the constant it was assigned
    to has been unset. This is because the class is still assigned
    anonymously as the value to the "Book" key in an instance of
    ActiveSupport::Dependencies::ClassCache.
    
    You can see this symptom by checking out the previous commit and
    running:
    
      BUNDLE_GEMFILE=gemfiles/Rails_42.gemfile bundle exec ruby  -e 'require "./test.rb"' -- --seed 43 -n "/^(?:DefaultValuePluginTest#(?:test_works_with_nested_attributes|test_can_specify_default_value_via_association))$/"
    
    Explicitly clearing the cache resolves this issue.
    
    See #47
    See #46
  2. @norman

    Fix setting defaults for nested attributes

    norman committed
    Resolves #16
  3. @norman
  4. @norman
  5. @norman

    Update comments

    norman committed
  6. @norman

    Rename test for clarity

    norman committed
  7. @norman

    Handle AR 3 version and feature setup more precisely

    norman committed
    AR < 4 now always means >= 3.2.0, and we can always assume the
    :without_protection option is supported.
  8. @norman

    Spacing

    norman committed
  9. @norman
  10. @norman
  11. @norman

    Remove "define_model_class" from test

    norman committed
    Use the real model classes instead.
  12. @norman

    Use "book" in place of "number"

    norman committed
    `Book#number` looks less silly than `Number#number`
  13. @norman

    Use Number in place of TestClass in most tests

    norman committed
    We're clearing the Number before and after each test, so we can safely
    use it directly in our tests now, which makes the code easier to read
    and write.
  14. @norman
  15. @norman

    Always use AR::Base.table_name=

    norman committed
    Since we now only support Active Record 3.2 or higher, we can assume
    this method in all model classes.
  16. @norman

    Remove insert from around block

    norman committed
    Only one test depends on this record having been inserted, so insert it
    in the test rather than during suite setup
  17. @norman
  18. @norman
  19. @norman
  20. @norman

    Use ternary operator for brevity

    norman committed
Commits on Dec 12, 2014
  1. @norman

    Merge pull request #48 from jrafanie/fix_order_dependent_tests

    norman committed
    Fix order dependent tests
Commits on Dec 10, 2014
  1. @norman

    Merge pull request #49 from tenderlove/attrbute_methods

    norman committed
    remove non-column attributes on create
Commits on Dec 9, 2014
  1. @tenderlove

    remove non-column attributes on create

    tenderlove committed
    rails/rails@fb2a1c4 removed a check for "real" columns from the `attributes_for_update` method.
    In Rails 4.2, default values for attributes that are not actual columns
    would be sent to the database.  Rails < 4.2 would remove these columns.
    
    This patch removes non-columns from the default values list befor
    sending it to Rails.
  2. @jrafanie

    Revert "Make tests order-dependent for now."

    jrafanie committed
    This reverts commit 4d532f3.
  3. @jrafanie

    Work in progress resolution of a test order dependence fix.

    jrafanie committed
    By adding minitest_bisect to the Gemfile and bundling, we can determine the test causing contamination.
    
    In this case, test_default_values_in_superclass_are_saved_in_subclass|test_can_specify_default_value_via_association.
    
    Fix test_default_values_in_superclass_are_saved_in_subclass, by changing the subclass from TestClass to TestClass2 to avoid polluting TestClass with an ancestor TestSuperclass which has a default_value for number.
  4. @norman

    Make tests order-dependent for now.

    norman committed
    Resolves #46
  5. @norman

    Revert "Fix setting default value by association on Rails 4.2."

    norman committed
    This reverts commit d703e15. It does
    not actually solve the problem it was intended to solve.
  6. @norman
  7. @norman
  8. @norman

    Bump version

    norman committed
  9. @norman

    Merge pull request #37 from aripollak/fix-default-values-in-superclas…

    norman committed
    …s-not-saved
    
    Fix saving default value from superclass in Rails 4
Something went wrong with that request. Please try again.