active_mocker 2.0.0
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.
Gemfile:
=
インストール:
=
バージョン履歴:
- 2.6.2 September 05, 2019 (40KB)
- 2.6.1.beta2 January 16, 2018 (39.5KB)
- 2.6.1.beta January 16, 2018 (39.5KB)
- 2.6.0 December 12, 2017 (39.5KB)
- 2.5.4 November 17, 2017 (38.5KB)
- 2.0.0 December 23, 2015 (30.5KB)