Sha256: cf339f94999623493eacf544f0026b058a5632c99d24e82612b24f8bf22c48bf
Contents?: true
Size: 1.45 KB
Versions: 1
Compression:
Stored size: 1.45 KB
Contents
Validation Matcher [![build status][ci-image]][ci] [![code climate][cc-image]][cc] ================================================================================== About ----- Use Rails 3 validation reflection to test validations. URLs: - Github: https://github.com/bm5k/validation_matcher/ - Documentation: http://rubydoc.info/github/BM5k/validation_matcher/master/frames - RubyGems: https://rubygems.org/gems/validation_matcher Installation ------------ Add to your Gemfile and run the `bundle` command to install it. ```ruby gem 'validation_matcher' ``` **Requires Ruby 1.9.2 or later.** Usage ----- ```ruby class Foo < ActiveRecord::Base validates :field_a, presence: true validates :field_b, uniquness: true validates :field_c, presence: true, uniquness: {case_insensitive: false} end require 'spec_helper' describe Foo do it { should validate(:presence).of(:field_a) } it { should validate(:presence).of(:field_b) } it { should validate(:presence).of(:field_c).with(case_insensitive: false) } it { should validate(:uniqueness).of(:field_b).with(options) } end ``` <!-- links --> [cc]: https://codeclimate.com/github/BM5k/validation_matcher "code climate" [ci]: http://travis-ci.org/BM5k/validation_matcher "build status" <!-- images --> [cc-image]: https://codeclimate.com/github/BM5k/validation_matcher.png [ci-image]: https://secure.travis-ci.org/BM5k/validation_matcher.png?branch=master
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
validation_matcher-1.0.0 | README.md |