active_mocker icon indicating copy to clipboard operation
active_mocker copied to clipboard

Generate mocks from ActiveRecord models for unit tests that run fast because they don’t need to load Rails or a database.

Results 9 active_mocker issues
Sort by recently updated
recently updated
newest added

Usage of polymorphic associations results in an exception e.g. ``` Missing model Bar for association Foo.belongs_to :bar, polymorphic: true ```

```ruby has_many :decision_mortgages has_many :credit_liabilities, through: :decision_mortgages ``` ActiveMocker treats credit_liabilities as an association on the parent model and ignores the `through`. The work around is ```ruby Model.new(credit_liabilities: credit_liabilities) ```...

Sample output ``` bash Generating Mocks |========================================================>>| 100% Error Summary errors: 1, warn: 5, info: 0 Failed models: ReportParser::UnderwritingData::ApplicationRecord 96 mock(s) out of 98 failed. To see more/less detail set...

Provide benchmarks of specific uses cases.

enhancement

Fix this limitation. A record that has been created and then is modified will persist changes without calling #save.

Looking for support in documenting useful things, both in the readme and in the code. If you find value in the project please consider giving back to the community.

enhancement