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.
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>
* 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
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.
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.