Project

rspec_gem

0.0
No release in over 3 years
Low commit activity in last 3 years
Invoke the tests rspec from gems in application rails.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Runtime

>= 1.2.8
>= 0
>= 2.0.0
>= 0.9.2
 Project Readme

RspecGem

Invoke the tests rspec from gems in application rails.

Installation

Add this line to your application's Gemfile:

gem 'rspec_gem'

And then execute:

$ bundle

Or install it yourself as:

$ gem install rspec_gem

Usage

For example, you have rails application of name "rails_app" and gem of name "example_gem" with the files for testing.

You can require rails rails environment by use method (include resource of application, like models)

RspecGem.require_rails_environment

or faster environment

RspecGem.require_model_environment

which you add into file spec_helper.rb which is included in your gem, for example:

require "rspec_gem"
RspecGem.require_rails_environment

Finally in your application rails_app invoke command (all tests from directory "spec" from gem example_gem)

$ bundle exec rspec_gem example_gem spec

with color

$ bundle exec rspec_gem example_gem spec --color

more precisely

$ rspec_gem example_gem spec/example_gem_spec.rb

show all tracks to testing files

$ rspec_gem example_gem -t

testing using spork

$ rspec_gem example_gem spec/models/. --drb