ActiveMocker v1.5 Release Notes
Release Date: 2014-07-07 // almost 10 years ago-
โ 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 withbefore(: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)
- Using
๐ 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.