GithubHelp home page GithubHelp logo

shoulda-tmbundle's Introduction

Adds shoulda snippets for use with rspec testing

Changes the scope selector so you can use the snippets in rspec tests

Shoulda TextMate bundle

The Shoulda gem makes it easy to write elegant, understandable, and maintainable Ruby tests.

To install with Git:

mkdir -p ~/Library/Application\ Support/TextMate/Bundles
cd ~/Library/Application\ Support/TextMate/Bundles
git clone git://github.com/shaliko/shoulda-tmbundle.git "Shoulda.tmbundle"

To install without Git:

mkdir -p ~/Library/Application\ Support/TextMate/Bundles
cd ~/Library/Application\ Support/TextMate/Bundles
wget http://github.com/shaliko/shoulda-tmbundle/tarball/master
tar zxf shaliko-shoulda-tmbundle*.tar.gz
rm shaliko-shoulda-tmbundle*.tar.gz
mv shaliko-shoulda-tmbundle* "Shoulda.tmbundle"

Snippets

  • Shoulda::ActionController::Matchers

    • should assign_to (sat)

    • should_not assign_to (snat)

    • should filter_params (sfp)

    • should redirect_to (srt)

    • should render_template (srt)

    • should render_with_layout (srwl)

    • should_not render_with_layout (snrwl)

    • should respond_with (srw)

    • should respond_with_content_type (srwct)

    • should route (sr)

    • should set_session (sss)

    • should_not set_session (snss)

    • should set_the_flash_to (sstft)

    • should_not set_the_flash (snsft)

  • Shoulda::ActionMailer::Matchers

    • should have_sent_email (shse)

  • Shoulda::ActiveRecord::Macros

    • should allow_mass_assignment_of (same)

    • should not_allow_mass_assignment_of (snama)

    • should allow_values_for (savf)

    • should not_allow_values_for (snavf)

    • should belong_to (sbt)

    • should have_many (shm)

    • should have_one (sho)

    • should have_and_belong_to_many (shabtm)

    • should ensure_inclusion_of (sei)

    • should ensure_length_of (sel)

    • should have_db_column (shdc)

    • should_not have_db_column (snhdc)

    • should have_db_index (shdi)

    • should have_readonly_attributes (shra)

    • should validate_acceptance_of (svao)

    • should validate_format_of (svf)

    • should validate_numericality_of (svno)

    • should validate_presence_of (svpo)

    • should validate_uniqueness_of (svuo)

  • Shoulda::Context::FastContext

    • fast_context (fcontext)

  • Factory

    • Factory (fac)

    • Factory.define (facd)

    • Factory.next (facn)

    • Factory.sequence (facs)

Credits

Shoulda.tmbundle is maintained by Shalva Usubov, and is funded by Hashtrain, LLC.

License

Shoulda.tmbundle is Copyright © 2010 Shalva Usubov, Hashtrain. It is free software, and may be redistributed under the terms specified in the MIT-LICENSE file.

shoulda-tmbundle's People

Contributors

shaliko avatar rweald avatar

Stargazers

Rafael Gonzaga Camargo avatar Yuan Yao avatar Uwe Ilgenstein avatar Jeremie Weldin avatar 爱可可-爱生活 avatar Tiago Link avatar Lailson Bandeira avatar Elle Meredith avatar Michael M avatar cbmeeks avatar Przemyslaw Kowalczyk avatar Tomas Markauskas avatar  avatar Max Mitchell avatar John Schank avatar gpt dev avatar Ben Vandgrift avatar Aviso, LLC avatar Tom Cocca avatar Simon Chiu avatar Tim Payton avatar JamieFlournoy avatar Kaz avatar Sean Porter avatar Evan Senter avatar Thiago Antonius (TAOS) avatar Doug Bryant avatar Nathan Youngman avatar Michael A. Alderete avatar Andy Croll avatar David Aaron Fendley avatar Sean Huber avatar Ed Schmalzle avatar Mike McClenaghan avatar Martin Ström avatar Ant Ramm avatar Râu Cao avatar Mark Carey avatar Dave Giunta avatar

Watchers

 avatar James Cloos avatar

shoulda-tmbundle's Issues

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.