0.03
No commit activity in last 3 years
No release in over 3 years
There's a lot of open issues
Guard-Teabag: Guard plugin for Teabag
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Runtime

>= 1.6.1
>= 0.5.3
 Project Readme

Guard-Teaspoon

Gem Version Dependency Status Build Status Code Climate Test Coverage License

Logo by Morgan Keys

Logo by [Morgan Keys](http://www.morganrkeys.com/)

Guard-Teaspoon allows you to run Teaspoon using Guard.

We recommend you first check out the installation steps for Teaspoon, and read about the configuration.

Join the chat at https://gitter.im/modeset/teaspoon

With Guard-Teaspoon you can start up Guard, make changes to your tests or implementation files, and the specs will be run automatically using Teaspoon. It behaves very similarly to guard-rspec.

This project is still experimental, but is being worked on.

Table of Contents

  1. Installation
  2. Usage
  3. Configuring Guard

Installation

Add it to your Gemfile. Like Teaspoon, in most cases you'll want to restrict it to the :development, :test groups.

group :development, :test do
  gem "guard-teaspoon"
end

Install Teaspoon using the install generator.

rails generate teaspoon:install

Generate the Guardfile that includes the standard Guard-Teaspoon template.

bundle exec guard init teaspoon

Usage

Start Guard.

bundle exec guard start

Make changes to your javascript specs or implementation files and the appropriate tests will run.

Configuring Guard

In general this isn't very complicated, but if you have multiple suites setup in Teaspoon this can get a little complicated -- there's an expectation that you understand what you're doing in regards to using Guard.

The default Guardfile will watch for any file changes within your app/assets/javascripts path and will attempt to resolve those file to a spec. If you're using QUnit, you can change this to be _test instead of _spec, or use js.coffee or coffee for file extensions, and you can use a more advanced regexp for other needs.

Guardfile

guard :teaspoon do
  watch(%r{^app/assets/javascripts/(.+)\.js}) { |m| "#{m[1]}_spec" }
  watch(%r{^spec/javascripts/.+$})
end

Specifying Teaspoon Environment

Guard-Teaspoon takes several options, but worth calling out is the environment option. This option allows you to tell Teaspoon where it should look for it's environment file, and is useful if Teaspoon is unable to resolve it's environment.

Guardfile

guard :teaspoon, environment: "spec/dummy/spec/teaspoon_env.rb" do
end

Available Options

...document when this is better hammered out...

License

Licensed under the MIT License

Copyright 2014 Mode Set

Make Code Not War

crest