Allows using RSpec as a testing tool instead of plain Test::Unit. Ensures the rubocop and plugins are part of the bundle.
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:test
task 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
spec/
directory to$LOAD_PATH
and provides a defaultspec_helper
file for your specs ; hence you can justrequire "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 3.4.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 !
Then execute:
$ bundle install
And finally restart your Redmine instance.