Commits on Dec 29, 2013
  1. @drapergeek

    Add 4.1.0 beta testing for #408

    drapergeek committed Dec 28, 2013
Commits on Dec 24, 2013
  1. @mcmire

    Add validates_absence_of matcher

    jmpage committed with mcmire Dec 5, 2013
Commits on Dec 19, 2013
  1. @mcmire

    Make `order` option Rails 4.0.1-compatible

    The way that we figure out whether the value which is passed to `order`
    is the same as the `order` that the association was defined with is by
    creating an ActiveRecord::Relation object from the given `order` and
    comparing it with the Relation stored under the association.
    Specifically, every time you call `order` on a Relation, it appends the
    value you've given to an internal `order_values` array, so we actually
    access this array and compare the two between the two Relation objects.
    
    Currently we assume that this `order_values` array is an array of
    strings, so it's very easy to compare. That was valid pre-Rails 4.0.1,
    but it looks like as per [these][1] [commits][2], it's now possible for
    `order_values` to be an array of Arel nodes. So, to make a proper
    comparison, we have to convert any Arel nodes to strings by calling
     #to_sql on them.
    
    [1]: rails/rails@d345ed4
    [2]: rails/rails@f83c9b1
    mcmire committed Dec 1, 2013
  2. @mcmire

    Add Appraisal for Rails 4.0.1

    mcmire committed Dec 1, 2013
  3. @mcmire

    Include instructions for non-Rails apps in README

    Courtesy @fj.
    mcmire committed Dec 18, 2013
Commits on Dec 16, 2013
  1. @fj
Commits on Dec 14, 2013
  1. @mcmire
Commits on Dec 13, 2013
  1. @mfrost @mcmire

    Use ActiveSupport delegation over Ruby Forwardable

    The delegation style found in the AssociationMatcher
    is an ActiveSupport style; requiring `forwardable`
    without extending it does not add delegation support.
    mfrost committed with mcmire Dec 12, 2013
  2. @mcmire
Commits on Dec 3, 2013
  1. @mcmire

    Refactor spec_helper

    The code that sets up the blank Rails application we use for testing is
    a little messy. Let's use an object to encapsulate this and then refer
    to this object every time we access Rails.application.
    mcmire committed Nov 22, 2013
  2. @mcmire

    Auto-retry `bundle install` when Travis runs tests

    `bundle install` doesn't always work -- sometimes it runs into errors
    making HTTP requests, for whatever reason. This will cause Travis to
    fail which is pretty annoying.
    
    * Travis supplies an executable called `travis_retry` which will
      automatically retry the command up to 3 times before really failing.
      Tell Travis to use this when it runs `bundle install` before it
      runs tests.
    * In spec_helper, we create a Rails app and use this within the
      test suite. This will also run `bundle install`. Unfortunately we
      can't use `travis_retry` for this as it's a function and is not
      available to us in Ruby-land, so use our own retry logic.
    mcmire committed Oct 23, 2013
Commits on Dec 1, 2013
  1. @lucianosousa @mcmire
  2. @k-rudy
Commits on Nov 23, 2013
  1. @mcmire
  2. @petedmarsh @mcmire

    Change `validate_uniqueness_of_matcher` to use 'a' as test value

    Previously `validate_uniquness_of_matcher` created records with a
    string of 16 characters in length. If the column under test test
    had a limit of fewer than 16 characters it would fail.
    petedmarsh committed with mcmire Nov 11, 2013
Commits on Nov 22, 2013
  1. @mcmire

    Rewrite the README

    * Add comprehensive examples for every method in the API
    * Change Shoulda references to shoulda-matchers
    * Mention that we use SemVer
    mcmire committed Oct 23, 2013
Commits on Nov 1, 2013
  1. @mcmire

    Fix converting association options to a Relation

    Under Rails 3 when using an association matcher in conjunction with a
    submatcher such as #order, we have to take the options on the
    association (:conditions, :order, etc.) and convert them to an
    ActiveRecord::Relation object. This happens in ModelReflector.
    
    Unfortunately, converting an :includes option was broken. This is in
    part due to ModelReflector not having proper tests, but also, the method
    that does the conversion to Relation is rather complex and could be
    broken up so it can be tested better. In fact I noticed that there's a
    lot of stuff in ModelReflector that does stuff around a Reflection
    object, so it would be better to define a ModelReflection class that
    simply decorates a Reflection. That's what I've done and also added
    proper tests.
    mcmire committed Oct 20, 2013
Commits on Oct 29, 2013
  1. @maurogeorge @mcmire
Commits on Oct 23, 2013
  1. @maurogeorge @mcmire

    RouteMatcher#to accepts a string as first param

    Some refactor
    maurogeorge committed with mcmire Oct 15, 2013
Commits on Oct 18, 2013
  1. @joekur @mcmire
  2. @lucianosousa @mxie
Commits on Oct 10, 2013
  1. @mcmire

    Update NEWS for #363

    mcmire committed Oct 10, 2013
  2. @SweeD @mcmire
Commits on Sep 30, 2013
  1. @pusewicz

    Don't extend non-existing modules

    Fixes an issue where a Rails project skips the test unit railtie
    completely, eg:
    
    # require "rails/test_unit/railtie"
    pusewicz committed Sep 30, 2013
Commits on Sep 20, 2013
  1. @drapergeek

    Bump to version 2.4.0

    drapergeek committed Sep 20, 2013
Commits on Sep 16, 2013
  1. @drapergeek

    Create a shared example for Numercial Submatchers.

    * Verify that all submatchers respond to the necessary interface
    * See: #357 for a reason why this is necessary
    drapergeek committed Sep 16, 2013
Commits on Sep 13, 2013
  1. @drapergeek

    Use 1.9 style syntax

    drapergeek committed Sep 13, 2013
  2. @drapergeek
Commits on Sep 11, 2013
  1. @carpodaster @mcmire

    Fix regression with context-dependent validations in ActiveResource

    As reported in #348, model#valid? is called with one argument while
    ActiveResource::Validations only defines #valid? without an optional
    argument.
    
    The interface of ActiveResouce::Validations#valid? is the same for
    A'resource in Rails 3.2 and the one extracted into a gem.
    
    Rails 3.2 version:
    https://github.com/rails/rails/blob/3-2-stable/activeresource/lib/active_resource/validations.rb#L123
    
    Gem version:
    https://github.com/rails/activeresource/blob/master/lib/active_resource/validations.rb#L160
    carpodaster committed with mcmire Aug 28, 2013
Commits on Sep 6, 2013
  1. @mcmire
  2. @MDaubs @mcmire

    Add have_secure_password matcher

    MDaubs committed with mcmire Aug 18, 2013
Commits on Aug 30, 2013
  1. @mxie
  2. @mxie

    Remove old version of uniqueness validation matcher specs

    When the `allow_nil` option was introduced, the tests written for it was based
    on an older version of the `validate_uniqueness_of` matcher specs. The tests
    are now in the newer version, located in `spec/shoulda/matchers/active_model`.
    mxie committed Aug 23, 2013
Commits on Aug 23, 2013
  1. @mxie
  2. @MDaubs

    Test Rails 4.0 on Travis CI

    MDaubs committed Aug 23, 2013