1
0
Fork 0
mirror of https://github.com/awesome-print/awesome_print synced 2023-03-27 23:22:34 -04:00
Commit graph

14 commits

Author SHA1 Message Date
Gerard Caulfield
e41d317e51
Fix outdated ActiveRecord tests
Update the Rails 4.2 ActiveRecord tests to test for the current
format of AR models

Prior to this change the tests were broken
2016-05-10 07:39:59 +10:00
Gerard Caulfield
c5e8669e9c
Simplify matching logic in tests
Simplify matching logic by adding a custom matcher which
handles the task of normalisation of object IDs instead of
calling gsub many times throughout the test code.

This allows our tests to focus more on what needs to be tested
instead obfuscating the tests with logic unrelated to what
the test is trying to cover.

It also allows making the normalisation code more robust so
there is less chance of an accidental match or typo slipping
in.

The change also replaces the arbitary default object IDs with a
string that makes it very obvious that it is just a placeholder.
2016-05-10 04:32:36 +10:00
Mauro George
526f907629 Improves spec runner harness, switches to better env detection.
Does not run rails specs when running mongoid specs

WIP Start of remove BRE to check tests

Remove old helper of active record

Use RSpec skip to skip AR specs

Run ActionView only when needed

Run ActiveSupport only when needed

Run Mongoid only when needed

Create ExtVerifier.require_dependencies

Run MongoMapper only when needed

Always load nokogiri specs

Always load ostruct specs

Run Ripple only when needed

Remove :: when check for defined constants

Require spec_helper directly

Remove 1.8.6 old monkey patch

Add some RSpec configs
2015-01-02 13:20:18 -05:00
Eoin Kelly
52bffc1873 Get specs passing with latest versions of extension gems
* Get specs passing with latest versions of
    * ActiveRecord  4.0.4
    * ActiveSupport 4.0.4
    * MongoMapper   0.13.0
    * Mongoid       4.0.0
    * ActionView    4.0.4
    * Ripple seems to be abandoned so no changes made.
* Clean up ActiveRecord setup:
    * Creating tableless AR objects seems even trickier in Rails 4 so
      simplify testing setup by using an in-memory SQLite DB back-end.

Conflicts:
	spec/ext/active_record_spec.rb
2014-12-29 12:11:08 -05:00
adamjonas
2bc678bba5 update rspec syntax from should to expect via transpec 2014-12-18 12:24:30 -05:00
Mike Dvorkin
5463de12e9 Manually merged expanded mongo_mapper support provided by gardelea 2012-09-06 18:16:25 -07:00
Mike Dvorkin
da0defa87a Resolved Mongoid/MongoMapper specs dependency 2012-09-06 16:34:11 -07:00
Mike Dvorkin
f24462a533 Made specs pass with the latest versions of mongo_mapper and mongoid gems 2011-11-24 00:25:52 -08:00
Mike Dvorkin
562201f7dd Streamlined error reporting for the extension specs 2011-11-23 21:33:03 -08:00
Mike Dvorkin
d2c0a398e2 Fixed nested left alighment; fixed ActiveRecord and MongoMapper object specs 2011-11-08 21:27:02 -08:00
Mike Dvorkin
785109a66e Fixed ~/.aprc dependency in specs 2011-11-08 18:30:50 -08:00
Mike Dvorkin
b8822574ec Refactored MongoMapper extension and its specs 2011-05-13 21:07:34 -07:00
Mike Dvorkin
5d76ded7ed Format ActiveRecord and MongoDocument instances as any other arbitrary objects 2011-05-13 17:36:12 -07:00
Mike Dvorkin
b538cca4c5 Renamed directories 2011-05-13 16:37:24 -07:00
Renamed from spec/mongo_mapper_spec.rb (Browse further)