Popularity
4.0
Growing
Activity
2.6
Growing
477
9
25

Description

ActiveMocker creates mock classes from ActiveRecord models, allowing your test suite to run at breakneck speed. This can be done by not loading Rails or hitting a database. The models are read dynamically and statically so that ActiveMocker can generate a Ruby file to require within a test. The mock file can be run by itself and comes with a partial implementation of ActiveRecord. Attributes and associations can be used the same as in ActiveRecord. Methods have the same argument signature but raise a NotImplementedError when called, allowing you to stub it with a mocking framework, like RSpec. Mocks are regenerated when the schema is modified so your mocks won't go stale, preventing the case where your units tests pass but production code fails.

Examples from a real apps

Code Quality Rank: L4
Monthly Downloads: 1,694
Programming language: Ruby
License: MIT License
Tags: Testing     Mock     Projects    

ActiveMocker alternatives and similar gems

Based on the "Mock" category

Do you think we are missing an alternative of ActiveMocker or a related project?

Add another 'Mock' Gem