1
0
Fork 0
mirror of https://github.com/thoughtbot/shoulda-matchers.git synced 2022-11-09 12:01:38 -05:00
Commit graph

12 commits

Author SHA1 Message Date
Michael Deering
d7ac9cb970 Do not apply .railsrc 2016-01-06 10:21:43 -07:00
Elliot Winkler
2e93e80b76 Keep test Rails app directory clean
All tests are run against a Rails app. The app is generated before each
test, and one would think it gets removed after each test. For unit
tests, this *does* happen before each test, but for acceptance tests, it
does not get removed at all. This commit ensures that this happens, so
that it is possible to run acceptance tests immediately after running
unit tests.
2015-12-30 21:36:53 -05:00
Elliot Winkler
e0a0200fe4 Make independent matchers really independent
Why:

* When `delegate_method` was modified a while back to add Doublespeak
  and use MatcherContext, Shoulda::Matchers::Independent became unable
  to be required independently.

To satisfy the above:

* Require Doublespeak and MatcherContext within
  `delegate_method_matcher.rb`.
* Add an acceptance test to ensure that Independent stays independent.

Secondary-Author: jc00ke <jesse@jc00ke.com>
2015-10-01 10:12:17 -06:00
Lucas D'Avila
721900b8fd Allow the use of matchers from multiple libs, for non rails projects.
* It changes shoulda-matchers to allow the integration with multiple
  libraries like active_model and active_record.

  For example, in a non Rails project isn't possible to use both
  validate_presence_of and validate_uniqueness_of matchers, because they
  are from different libraries (one from active_model and the other from
  active_record respectively).

  This change allow the integration with multiple libraries. fixes #710
2015-06-01 00:43:07 -06:00
Elliot Winkler
72f60fae94 Add support for Postgres
When running tests, you can now switch between running them against a
SQLite or PostgreSQL database. This is accomplished by modifying the
unit and acceptance tests so that when they generate and load the test
Rails application, database.yml is replaced with content that will
configure the database appropriately.
2015-02-12 16:01:00 -07:00
Elliot Winkler
942a600e07 Changes to CommandRunner
* Use full output instead of elided output on failure
* Refactor debugging code a bit
* Use :chdir option to Process.spawn instead of Dir.chdir
2015-02-12 15:24:40 -07:00
Elliot Winkler
ab91bbf123 Use generic test framework for independent matchers test 2015-02-09 10:52:51 -07:00
Elliot Winkler
190007155e Remove auto-detection of Rails / test framework 2015-02-09 10:52:51 -07:00
Elliot Winkler
d7f7f58637 Remove debugger, byebug, and web-console from 4.2
debugger and byebug cannot be present in Appraisals because they only
work on specific Ruby versions, and we test against a range of Ruby
versions. Hence, they can't be present in the Rails application that
gets generated in acceptance tests, either.

Also, we don't really need web-console to be there, it's just an extra
dependency.
2015-02-05 10:22:12 -07:00
Elliot Winkler
8223420ba2 Fix acceptance tests where we should be using Bundler 2014-12-25 00:45:06 -05:00
Elliot Winkler
0da09b2132 Clean up acceptance tests a bit 2014-11-05 16:39:08 -07:00
Elliot Winkler
3fb4cdb3b7 Add new RSpec acceptance tests to replace Cucumber 2014-11-05 09:53:33 -07:00