Skip to content

Test a RYS with RYSPEC

RYSPEC (gems/ryspec) provides the RSpec setup for RYS engines. The easy_engines/ directory loads it in the test group of its Gemfile. Specs of Easy plugins are described below.

Run specs from the application

Specs of an engine live in its spec/ directory. Use these frameworks:

  • rspec-rails
  • factory_bot: put factories into spec/factories and shared helpers into spec/support. Files in spec/support are loaded automatically.

Run the specs of all RYS engines, or only the RYSPEC ones, from the application root:

bundle exec rake ryspec:spec:all
bundle exec rake ryspec:spec

Easy plugins, including your modification_<name> plugin, keep their specs in test/spec/ and start them with require "easy_extensions/spec_helper":

bundle exec rspec plugins/easyproject/easy_plugins/modification_acme/test/spec

Run specs directly from a RYS

Running rspec inside a RYS directory needs a dummy Rails application that RYSPEC finds in the directory given by the DUMMY_PATH environment variable or in test/dummy. The dummy application is internal to Easy8 and is not available to customers.