Very basic gem that allows you to verify that every file in your project has a matching spec or test file.
It expects that the folder structure of the root directory and spec directory be identical, so it's fairly limited in the fact that it doesn't look at rails route or lib tests.
It was built with rspec in mind, but I don't see why it couldn't be repurposed for other test harnesses.
Add this line to your application's Gemfile:
gem 'has_specs'
And then execute:
$ bundle
Or install it yourself as:
$ gem install has_specs
# spec_helper.rb (or rails_helper.rb)
require 'has_specs'
# ... in the config block
HasSpecs.ignore << 'application_controller.rb'
HasSpecs.verify
configuration.ignore << 'some_file_to_ignore.rb'
configuration.exclude << 'some/whole/dir/to/exclude.rb'
configuration.include << 'some/whole/dir/to/optionally/include'
configuration.suffix << '_spec'
configuration.root = 'some/other/root/for/source/files'
configuration.spec_root = 'some/other/root/for/tests'
- Fork it ( https://github.com/[my-github-username]/has_specs/fork )
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Add some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create a new Pull Request