Code Monkey home page Code Monkey logo

guard-teaspoon's Introduction

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

guard-teaspoon's People

Contributors

aviddiviner avatar bigtunacan avatar chrisnicola avatar drench avatar jejacks0n avatar prashantrajan avatar quady avatar rymai avatar samu avatar thejchap avatar trbrink avatar

Watchers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.