All Versions
49
Latest Version
Avg Release Cycle
56 days
Latest Release
1305 days ago

Changelog History
Page 5

  • v1.7.1 Changes

    October 20, 2014

    ✨ Enhancement

    • πŸš… Now works with Rails versions: 4.0, 4.1, 4.2beta2.

    πŸ›  Fix

    • Issue when a relation had a scope defined by proc it would fail.
  • v1.7 Changes

    October 14, 2014

    ✨ Enhancement

    • βͺ Now will regenerate mock after rake db:rollback.
    • πŸ— Check added to see if mock was created with same running gem version of ActiveMocker. If they are not the same it will raise an error informing you to run rake active_mocker:build.
    • belong_to and has_one relationships when assigned will in most cases assign it's self to the corresponding has_many or like association. See test_rails_4_app/spec/active_record_compatible_api.rb for supported detail of supported ActiveRecord features.
    • A class that Inherits a model now has the table of the parent.
    • Use this option if you need to modify where the mock generation hooks into. ActiveMocker::Config.model_base_classes = %w[ ActiveRecord::Base ]
    • πŸ— When running rake active_mocker:build it will display the number of mocks that failed.
    • 🀑 Exceptions in mock generation no longer halt the rest of the mocks from generating.
    • βž• Add explicit message of what to do when a method is unimplemented.
    • 🌲 Will create own log file log/active_mocker.log it will be cleared on each generation.
    • Attributes, associations, and scopes will now inherit from their parent class.

    βœ‚ Removed

    • 🚚 ActiveMocker::Mock::Config.experimental flag has been removed, these are now on by default.
    • βœ‚ Remove deprecated option ActiveMocker.mock
    • βœ‚ Remove Experimental feature reload
    • Remove experimental flag for set foreign_key on collection for has_many, belongs_to, and has_one.
  • v1.6.3 Changes

    August 14, 2014

    πŸ›  Fix

    • βœ‚ Remove check for object is defined and then deleting, it is no longer needed there are better ways to manage clearing state.
    • πŸ— rake active_mock:build failed parsing when an ActiveRecord Model had no table, example where self.abstract_class = true was set.
    • πŸ— rake active_mock:build failed for STI models.

    Enhancement

    • 🐎 Removing methods #hash and == and using Ruby defaults gives modest performance improvements.
    • 🐎 Cache build_types object for small performance improvements.
  • v1.6.2

    July 31, 2014
  • v1.6.1 Changes

    July 30, 2014

    πŸ›  Fix

    • In experimental features where variable name should of been a symbol. ### ✨ Enhancement
    • experimental features: When assigning an association the record being associated will now try to either assign a has_many or has_one association onto the inputted record.
  • v1.6 Changes

    July 29, 2014

    ✨ Enhancement

    • When calling limit and then delete_all will raises an ActiveMocker error:
    • When mass assignment an unknown attribute the error message will mirror ActiveRecord.
    • where can now accept a range instead of just an array as a value.
    • ⚑️ update can update multiple records.
    • delete can take an array or an integer
    • find will now raise RecordNotFound
    • count can now take an attribute name and will return the total count of records where the attribute is present.
    • πŸ‘ create now supports creating multiple records at once.

    βž• Added

    • βž• Added documentation for many methods.
    • find_or_create_by/find_or_initialize_by now accessible from any collection.
    • Instance methods attribute_names, attribute_present?, has_attribute?
    • 🀑 Using ActiveMocker::Mock.config.experimental = true. This will turn on features that are not complete and may not work as expected, especially if you have complex relationships. This will activate the following features:
      • When passing in collection all item in collection will set its foreign key to the parent.
      • When setting association by object it will set the child association.

    πŸ›  Fixed

    • new_record? would return the opposite of the truth.
    • βœ‚ Remove method to_hash because it is unsupported in ActiveRecord.
    • 🀑 Requiring active_mocker/rspec_helper will now require loaded_mocks class. If no mocks were required the constant lookup would fails.
    • βœ… When a model is deleted the mock file will not linger and letting tests pass.
  • v1.5.2 Changes

    July 14, 2014

    πŸ›  Fixed

    • πŸ— rake active_mocker:build will only run after rake db:migrate instead of db:schema:load and db:reset.
    • βœ‚ Removed Unused folder lib/active_record
  • v1.5.1 Changes

    July 08, 2014

    πŸ›  Fixed

    • πŸ›  Fix Queriable#sum to default to zero when value is nil
    • βœ‚ Remove rspec_helper.rb from mock.rb.
  • v1.5 Changes

    July 07, 2014

    βž• Added

    • βœ… Modules that are included/extended in ActiveRecord Models are now available. This may cause failing tests, requiring the modules will fix the issues.
    • 🀑 Scoped methods from association will be available if the associated mock is loaded.
    • rspec_helper.rb
      • Using tag active_mocker:true will stub ActiveRecord Model constants for Mock constants. To use with before(:all) wrap Constant in #mock_class('ClassName'). Using all AR Model names will allow a spec file to run as a full Rails test and as a unit test.
      • Tag will also clear all mocks after(:all)

    πŸ—„ Deprecated

    • mock_class_method and mock_instance_method are deprecated and will be removed in 2.0. Rspec 3 mocks has a better implantation of this feature.

    βœ‚ Removed

    • Nothing.

    πŸ›  Fixed

    • has_many#create_assocation will now correctly add it self to the parent record.