Gyst is a project mainly written in Ruby, based on the MIT license.
A suite of helpers to aid in speeding up your tests.
A suite of helpers to aid in speeding up your tests; including scripts, existing libraries, and patches.
Inspired by Nick Gauthier's "Grease-Your-Suite" presentation(s).
Faster tests? Good.
First, some songs to test by courtesy of
gem install gyst
No runtime dependencies (except for the libraries you choose to patch).
Various helper scripts.
rakee # runs rake tasks with REE configured for tests
raket # hydra helper, runs rake tasks with RAILS_ENV=test and REE configured for tests
grease_your_suite.sh # configures REE (different for linux/osx?
rakee
configures REE for testing, then runs the task(s). It simply executes grease_your_suite.sh before running the rake task.
Usage:
rakee # runs all tests after configuring REE
rakee test:units
rakee features
raket
is a helper for the hydra gem. Hydra requires that RAILS_ENV=test
. raket
sets RAILS_ENV and configures REE for testing, then runs the task(s).
Usage:
raket hydra
raket hydra:specs
This script configures Ruby Enterprise Edition (REE) for testing,
as suggested here.
Usually used as a helper script for rake tasks.
Also useful for a group of specs.
We recommend you use an alias:
alias gys=grease_your_suite.sh
Usage:
gys cucumber
gys rspec spec
gys rspec -cfs spec/a_sub_dir
As of 2011-05, "require 'gyst'
" is a noop.
You must require the specific pieces that you want. We'll turn this on once more pieces are available, otherwise we will probably break your tests with each release.
Patch factory_girl to use :build, break some tests.
Add 'db_null', break some tests.
Simply by using "require 'gyst'"? Let's wait.
We are using "selective requires" for the libraries and scripts. Want everything? Simply: require 'gyst' # (TODO) enables all the libraries and applies all the patches
You can also just require
the pieces you want.
Yells if you try to access the db
require 'gyst/db_null' # (TODO)
Sets default_strategy to :build. Creating models in the db is slow. Don't do it if you don't have to.
require 'gyst/factory_girl' # all factory_girl enhancements (rspec, test_unit, etc)
require 'gyst/factory_girl/rspec' # (TODO) just patch for rspec
require 'gyst/factory_girl/test_unit' # (TODO) just patch for Test::Unit
Ruby 1.9.2 (p180)
Nick Gauthier, for his "Grease-Your-Suite" presentation(s)
Committers (git log --all --format='%aN, ' | sort -u
):
Matt Scilipoti
Contributions and discussions are welcome. Feel free to add suggestions and bugs to our issues on github.
bundle install
. Run all tests with rakee
rakee
skips @gemset features, due to (bundler?) errors.
cucumber
runs ALL features.When adding a new shell script
rake build
rake install
Do NOT use rakee/raket
to run the features. This will set ENV vars,
borking the ENV var related tests.
Copyright (c) 2011 Matthew Scilipoti, released under the MIT license