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

31 commits

Author SHA1 Message Date
Gerard Caulfield
9d63f12f93
Update to latest code climate method
According to the code climate docs we should no longer call their
runner at the top of our spec file and instead load simplecov.
Travis will then handle passing on the simplecov files to codecov.
2016-11-05 23:15:27 +11:00
Gerard Caulfield
f628193028
Ensure stub_dotfile! is called before all specs
The previous stubbing of dotfiles was still allowing calls to fall
through and populate the AwesomePrint.defaults hash which would then
cause some tests to fail if run in a certain order.

e.g. https://github.com/awesome-print/awesome_print/issues/265

One place in particular where this would happen is if you ran the
action_view_spec before other specs as it did not stub the dotfile.

This change makes dotfile stubbing more reliable, specific and
ensures it is run for every spec. I've also removed all instances
where it was being called manually, as this is now not needed due
to it being automatic.
2016-08-27 23:43:32 +10:00
Gerard Caulfield
fa6f4d3768
Improve readability by following style rules
These were mostly fixes to Rubocop issues which also helped with
readablity of the code.
2016-08-27 23:10:00 +10:00
Gerard Caulfield
5b472ccbe6
Allow non .aprc File.readable? calls
`stub_dotfile!` was blocking all calls to `File.readable?` instead
of just calls to load the `.aprc` file. This meant that trying to
use other libraries, such as pry, which relied on `File.readable?`
would fail in instances where `stub_dotfile!` had been called.

This change fixes that, while keeping the original intended
behaviour.
2016-07-01 16:11:02 +10:00
Waldyr de Souza
eef3caf546 Update copyright header based on Michael's comment on #242 2016-06-08 20:39:57 -03:00
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
cc1d9d80d2 Start of Code Climate coverage 2015-02-04 19:18:24 -02:00
Nicolas Viennot
06a4649bb5 Update NoBrainer awesome prints 2015-01-20 10:22:26 -05: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
Mauro George
e62397c2bb Fix broken specs
Fix specs on all gemfiles.
Removed some specs related to version before of ActiveRecord 3.2.
2014-12-31 13:04:42 -02:00
adamjonas
2bc678bba5 update rspec syntax from should to expect via transpec 2014-12-18 12:24:30 -05:00
Michael Dvorkin
3723f677cf Happy new year ;-) 2013-09-19 21:24:38 -07:00
Mike Dvorkin
4462fce5fd Updated copyright year 2012-09-11 15:43:41 -07:00
Mike Dvorkin
edee37c5c7 ap(object) now returns nil when running under IRB or Pry 2012-09-05 21:55:04 -07:00
Mike Dvorkin
eb295c106d Small spec fixes for Ruby 1.9.3 2012-09-03 12:23:31 -07:00
Mike Dvorkin
246f5f93ab Made [rake spec] run with ruby 1.9.3 2012-09-03 11:54:32 -07:00
Mike Dvorkin
b538cca4c5 Renamed directories 2011-05-13 16:37:24 -07:00
Mike Dvorkin
24b6192f57 Avoid loading awesome_print more than once (ex. ~/.irbrc and then Rails console) 2011-05-13 14:42:04 -07:00
Mike Dvorkin
62c07edea2 Add missing String methods to make all specs pass with Ruby 1.8.6 2011-05-13 13:22:01 -07:00
Mike Dvorkin
f567dda7bd Updated list of contributors 2011-05-06 17:35:49 -07:00
Mike Dvorkin
9c30b5286c Get rid of old Rspec 1.3 dependency 2011-05-06 16:49:42 -07:00
Andrew O'Brien
7907a5871d Added AwesomePrint.force_colors! to allow outputting colors when not run in a process attached to a TTY. 2011-05-04 21:58:11 -04:00
fuJiin
c5551ac9c7 change spec gem loading for ruby 1.8.7 2011-03-29 00:48:23 -07:00
Mike Dvorkin
d71b885e6d Updated copyright year 2011-02-02 22:48:27 -08:00
Mike Dvorkin
a0dab8cd57 All specs pass with Ruby 1.8.7/RSpec 1.3 and Ruby 1.9.2/RSpec 2.0 2010-10-31 22:34:50 -07:00
Mike Dvorkin
3ab0cbabc1 ActiveRecrd specs pass with Ruby 1.9.2 2010-10-31 19:21:26 -07:00
Mike Dvorkin
816b5a6513 Made 'rake spec' work with Ruby 1.9.2/RSpec 2 2010-10-31 16:10:08 -07:00
Tobias Crawley
9166bab5d0 Removed dependence on active_support for alias_method_chain; fixed failing AR tests; fixed issue with AR class comparison. 2010-04-22 00:41:40 -04:00
Mike Dvorkin
bf3c9915b6 Stub ~/.aprc in specs to make sure custom defaults do not affect them 2010-04-08 19:57:58 -07:00
Mike Dvorkin
25786aacd8 Initial commit to ap. 2010-03-24 21:31:59 -07:00