This is necessary in order to use Zeus, since Rake is loaded before
Bundler (and so if the version of Rake installed locally and the version
in the Gemfile differ then Bundler will complain).
This is an effort to vastly decrease the time it takes to run a single
unit test file and therefore increase productivity and happiness for
people working on this project.
If you want to run a unit test file, now you can use `zeus rspec`
instead of `rspec` -- assuming you run `zeus start` first -- and it will
run a LOT faster.
Because test files tend to have long file paths, you can even use a
shorter version of those paths. So instead of saying:
zeus rspec spec/unit/shoulda/matchers/active_record/validate_uniqueness_of_matcher_spec.rb
you can say:
zeus rspec active_record/validate_uniqueness_of_matcher_spec.rb
Why:
* At some point a while back, Appraisal introduced a bug fix that made
it possible to run `rspec` through `appraisal` and pass the `-e`
option to target certain tests. This makes life much easier.
* It's been a while since we've upgraded Appraisal anyway.
Why:
* The guard-yard gem doesn't seem to work so well anymore. In fact, the
problem is with `yard server` -- it doesn't seem to use our custom
template files.
To satisfy the above:
* Instead of using Guard and guard-yard, use the fssm gem to manually
watch various files.
* Instead of using `yard server`, run `yard doc`, which *does* honor our
custom template files.
* You can run `rake autogenerate_docs` to make this happen; update the
README accordingly.
[ci skip]
The latest commit of pry removes a lot of annoying warnings.
Unfortunately a new release has not been issued yet, so just use the
master branch for now.
Secondary author: Luciano Sousa <ls@lucianosousa.net>
Also, upgrade to rspec-rails 3.2.0 explicitly. (See
b7fe87ae91 for an explanation of why 3.2.0
is necessary here.)
* Remove Aruba and Bourne since we don't use them anymore
* Remove Rails from main Gemfile as it's already a dependency in each of
the appraisals
* Tighten dependency on Rake to 10.x
* Move dependencies shared among appraisals to Appraisals
* Ruby 2.2 removed Minitest and Test::Unit from the standard library
[[1]], [[2]]
* rspec-rails requires Test::Unit for Rails versions prior to 4.1 (which
switched to Minitest)
* This doesn't work now, because we don't have Test::Unit present in the
gem bundle
* RSpec 3.2.0 fixes this issue [[3]]
I don't really see this as a huge concern, since we were testing against
RSpec 2.99 for Rails < 4, and that has most of the changes that RSpec 3
has.
[1]: f8c6a5dc02
[2]: 96f552670d
[3]: 999ebb7c5c (diff-08d960c572ac094640dd183fa9641393R13)
Currently before running unit tests we are getting auto-required before
rspec-rails is getting required. This is bad because we need to wait
until rspec-rails is loaded before injecting Shoulda::Matchers::* into
the current RSpec context, otherwise matchers that clash with
rspec-rails (such as `render_template` will get overridden).
This is happening when creating and booting the Rails application.
Bundler will auto-require any gems in the Gemfile. One of these gems is
ourselves (via the `gemspec` line). Since there aren't any dependencies
in the gemspec, there's no need for us to be in the Gemfile.
This means that we no longer have to explicit `include` Rails
ActionController template assertions in the tests for `render_template`
as they should get included automatically for us.
Currently some dev dependencies are in the Gemfile, and some are in the
gemspec. The dependencies in the Gemfile are there because they are
using Bundler-specific options, so there is a legitimate reason for them
to be there, however, it's confusing to have gems in two places. So the
common denominator is to have them in the Gemfile.