Commit Graph

8 Commits

Author SHA1 Message Date
Elliot Winkler 4e2448d775 Teach have_db_index about expression indexes
In Rails 5, the schema layer was updated so that indexes could be
created on expressions rather that simply columns. Update
`have_db_index` so that you can test for this.

More reading: <edc2b77187>
2019-05-31 00:12:10 -06:00
Elliot Winkler 10574698c3 Remove helper comments
[ci skip]
2019-05-30 22:47:18 -06:00
Elliot Winkler 4d3efe23f4 Rewrite have_db_index matcher
* Bring the file up to date style-wise with other matcher files
* Bring the tests up to date with other tests
* Improve error messaging
* Simplify documentation
2019-05-30 21:15:52 -06:00
Joey Cheng ab69fab500 Update have_db_index_matcher to test for custom db connection 2019-05-23 21:57:21 -06:00
Elliot Winkler d86fe2d1c0 Fix test suite to properly tag example groups
When running unit tests we need to ensure that we are simulating how
other people will use the matchers as best we can. This means, for
instance, tagging any example groups that test controller matchers as
controller example groups.
2014-12-25 00:44:53 -05:00
Elliot Winkler 3a76f9389f Convert from Mocha to RSpec Mocks 2014-11-19 16:43:32 -07:00
Elliot Winkler f922613386 Reorganize unit tests, part II
* Change 'spec' Rake task to 'spec:unit'
* Require unit_spec_helper.rb in unit tests, not spec_helper.rb
* Re-namespace files in spec/support/unit under UnitTests
* Files in spec/support/unit/helpers no longer automatically add
  themselves to RSpec - this happens in unit_spec_helper.rb
* Extract RecordWithDifferentErrorAttributeBuilder and
  RecordValidatingConfirmationBuilder to separate files
2014-11-05 09:53:20 -07:00
Elliot Winkler bbdf8a807e Reorganize unit tests, part I
* Move spec/shoulda to spec/unit_tests/shoulda
* Move spec/support/*.rb to spec/support/unit_tests/{helpers,matchers}
* Move spec_helper.rb to unit_spec_helper.rb
2014-11-04 14:43:59 -07:00