Fixes cases where you may be using ActiveModel without ActiveRecord.
Also add a test for loading without ActiveRecord.
The Cucumber feature creates a Gemfile containing ActiveModel and
shoulda-matchers, and then asserts that both can be loaded without any
errors.
The ActiveModel version used will match that of the Rails version
specified in the Appraisal Gemfile; and if no such version can be
determined, the latest will be used.
Closes#480.
Under Minitest 5 (or a Rails 4.1 project), you will get a warning
MiniTest::Unit::TestCase is now Minitest::Test.
when you attempt to run tests. This is because shoulda-matchers requires
'test/unit/testcase', even if Test::Unit is not being used.
It is not a good idea for shoulda-matchers to require *anything* that
the user may not be using, whether it's Test::Unit or RSpec. We should
assume that by the time shoulda-matchers is required, the user has
already required all of whatever test framework they are using, not none
or even some of that framework.
The current form of including independent matchers for TestUnit does not
end up including it in `ActiveSupport::TestCase` tests in a Rails app.
This ensures that `Shoulda::Matchers::Independent` are available in
`ActiveSupport::TestCase`.
In Rails 4, ActiveSupport::TestCase no longer inherits from
Test::Unit::TestCase. In fact, everything uses ActiveSupport::TestCase
so there is no real reason for us to extend Test::Unit::TestCase.
> Use a pessimistic version in the Gemfile for gems that follow semantic
> versioning, such as rspec, factory_girl, and capybara.
https://github.com/thoughtbot/guides/tree/master/best-practices
* Upgrade dependencies so specs run on new Bourne.
* Use semantic versions in step_definitions gems.
* Rely on ActiveSupport::Dependencies.clear for reloading constants.
http://rkh.im/code-reloading