Redmine base_rspec plugin
Allows using RSpec as a testing tool instead of plain Test::Unit
Note that this plugin mainly targets developers of Redmine plugins. If you are not a Redmine plugin developer, chances are you are not at the right place!
Having the plugin installed in your
plugins/ directory is sufficient.
As of today the plugin provides the following things:
- adds a Gemfile so that bundler will pick up rspec and rspec-rails
- modifies Redmine's
redmine:plugins:testtask so that all plugins specs run along with test/unit ones (you can restrict to a specific plugin with the "NAME" environment variable, like other redmine plugin test tasks)
- adds this plugin's
$LOAD_PATHand provides a default
spec_helperfile for your specs ; hence you can just
require "spec_helper"on top of your spec files if this default one is sufficient for you
- enables code coverage with SimpleCov if your environment contains the environment variable "COVERAGE"
Note that if you want to run specs directly with the
rspec command, and you use the
spec_helper of this plugin directly, you may have to specify the
-I option to have the correct load path:
rspec -Iplugins/redmine_base_rspec/spec plugins/<your_plugin>/spec
This plugin is compatible with Redmine 2.1.0+.
Please apply general instructions for plugins here.
First download the source or clone the plugin and put it in the "plugins/" directory of your redmine instance. Note that this is crucial that the directory is named redmine_base_rspec !
$ bundle install
And finally restart your Redmine instance.
- Fork it
- 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 new Pull Request