Skip to content

Ruby script to run ruby tests & colourise output. Test files must be in specs/ or tests/ directory

Notifications You must be signed in to change notification settings

CraigMorton/ruby_specs_runner

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

35 Commits
 
 
 
 
 
 

Repository files navigation

ruby_specs_runner

Ruby script to run ruby tests & colourise output. Test files must be in directory named either specs/ or tests/. The script will run all .rb files within the specs/ (or tests/) directory.

You can run this script from either the directory above the specs/ (or tests/) directory, or from within the specs/( or tests/) directory itself.

To install the script in your home directory and set up and alias in your .zshrc to run it from anywhere, run these three commands in your terminal:

curl https://raw.githubusercontent.com/CraigMorton/ruby_specs_runner/master/run_specs.rb >> ~/ruby_specs_runner.rb
echo "alias rubytest='ruby ~/ruby_specs_runner.rb'" >> ~/.zshrc
source ~/.zshrc

First command downloads the script from this github repo. Second command creates an alias in your .zshrc Third command reloads your .zshrc so you can start using the alias in the current terminal tab.

If you use a different shell (I'm assuming most people who want to use this are codeclan students so I know they have zsh) obviously you'll have to replace ~/.zshrc in the second and third commands with your own shell configuration file.

Output:

after

Before, using a simple bash script to run each spec file in turn:

before

About

Ruby script to run ruby tests & colourise output. Test files must be in specs/ or tests/ directory

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages