Module: Ruber::RSpec

Defined in:
plugins/rspec/rspec.rb,
plugins/rspec/ruber_rspec_formatter.rb,
plugins/rspec/tool_widget.rb

Overview

Frontend plugin to RSpec

This plugin provides commands to run examples for all the files in the current project or on the current document (only if it’s part of a project). In the latter case, the command can be issued while viewing either the spec or the code file. Besides, an action to switch from spec file to code file and one to do the reverse switch are provided.

The pattern to extract the name of the spec file from that of the code file can be customized in the project configuration dialog (by default the plugin assumes that the spec file for for a file called code.rb is code_spec.rb). The directory where the spec files are can also be customized (by default it’s the spec subdirectory under the project directory)

the spec command are from the code files. The name of the code file is obtained by using the special sequence %f in the strings. Only the file name of the code file is taken into account (not the directory). All the spec file names are relative to the directory specified in the rspec/spec_directory option. If more than one entry is specified, all of them will be tried

API for feature rspec

Plugin object API

See API for Plugin

Global Settings

rspec/ruby_options – <String>
the options to pass to ruby when executing

Project Settings

rspec/executable – String

the path to the spec executable

Only for:
  • projects
rspec/options – <String>

the options to pass to the spec command

Only for:
  • projects
rspec/spec_directory – String

the directory where the example files

Only for:
  • projects
rspec/spec_pattern – <String>

patterns to generate the spec files

Only for:
  • projects

Defined Under Namespace

Classes: BaseFormatter, ConfigWidget, FilterModel, Plugin, ProjectExtension, ProjectWidget, ToolWidget, Version1Formatter, Version2Formatter

Constant Summary

Formatter =
RSPEC_VERSION == 1 ? Version1Formatter : Version2Formatter