Coder Social home page Coder Social logo

remockable's Introduction

Remockable

Build Status

A collection of RSpec 2 matchers to simplify your web app specs.

Background

The goal of this project is to provide a modern replacement to the now unmaintained Remarkable project. Remarkable was a great asset when Rails 2.3 was current, but now that Rails 3 has become mainstream, a gap has been left by still unreleased Remarkable 4.0.

In looking at the code for Remarkable to determine the feasibility of continuing work on Remarkable itself, it seems clear that the scope of that project has outgrown its usefulness for most users. It was with this conclusion in mind that Remockable was born. It's an attempt to start with a clean slate but maintain the original goal of Remarkable in spirit.

Installation

Add this line to your application's Gemfile:

gem 'remockable'

And then execute:

$ bundle

Or install it yourself as:

$ gem install remockable

Usage

Remockable provides matchers for use with Active Model and Active Record classes.

Active Model Matchers

The following Active Model matchers are supported:

  • allow_mass_assignment_of
  • validate_acceptance_of
  • validate_confirmation_of
  • validate_exclusion_of
  • validate_format_of
  • validate_inclusion_of
  • validate_length_of
  • validate_numericality_of
  • validate_presence_of

Active Record Matchers

The following Active Record matchers are supported:

  • have_column
  • have_index
  • have_scope
  • have_default_scope
  • belong_to
  • have_one
  • have_many
  • have_and_belong_to_many
  • validate_associated
  • validate_uniqueness_of

Contributing

  1. Fork it.
  2. Create your feature branch (git checkout -b my-new-feature).
  3. Commit your changes (git commit -am 'Added some feature').
  4. Push to the branch (git push origin my-new-feature).
  5. Create a new Pull Request.

Copyright

Copyright © 2010-2012 Tyler Hunt. See LICENSE for details.

remockable's People

Contributors

tylerhunt avatar dennmart avatar jswanner avatar

Watchers

 avatar James Cloos 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.