I noticed that some specs can't be run individually, as their dependencies are not correct. This can become rather inconvenient while debugging Administrate. This PR fixes this issue.
A way to check that specs run individually is with the following one-liner:
$ find spec | grep _spec.rb | while read spec; do bundle exec rspec $spec; done
This includes some changes that are not really necessary, but I think make the specs make more sense. I'm referring mainly to things like spec/generators/assets/javascripts_generator_spec.rb
, where I make sure that support/generator_spec_helpers
is required before the tested code, because I feel that the helpers should be loaded first (like spec_helper
or rails_helper
) are.