Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Commits on Jun 1, 2015
  1. @mcmire

    Bump version to 3.0.0.rc1

    mcmire authored
  2. @mcmire

    Fix failure message for numericality matcher

    mcmire authored
    Secondary author: Mauro George <maurogot@gmail.com>
    
    Sometimes the failure message did not always provide the reason for
    failure. For instance, given this validation:
    
        validates :ano, numericality: { only_integer: true, greater_than_or_equal_to: 1900 }
    
    this test:
    
        it { should validate_numericality_of(:ano).is_greater_than_or_equal_to(1900) }
    
    would fail with the following:
    
        Did not expect errors  when ano is set to 1900.000000000001, got error:
    
    as you can see, the failure message doesn't contain the validation
    error.
    
    In the process of making this fix, we changed how the matcher fails so
    that it will so when the first submatcher fails, not the last. This
    changes what the failure message looks like, but not the basic
    functionality of the matcher itself.
  3. @lnikkila @mcmire

    Fix typo in `rescue_from` description.

    lnikkila authored mcmire committed
    Changes the description message into the imperative mood. Now RSpec’s
    output makes more sense:
    
      ApplicationController
        should rescue from ActiveRecord::RecordInvalid
  4. @maurogeorge @mcmire

    Add doc to join_table qualifier on have_and_belong_to_many matcher

    maurogeorge authored mcmire committed
    [ci skip]
  5. @lucasdavila @mcmire

    Allow the use of matchers from multiple libs, for non rails projects.

    lucasdavila authored mcmire committed
    * It changes shoulda-matchers to allow the integration with multiple
      libraries like active_model and active_record.
    
      For example, in a non Rails project isn't possible to use both
      validate_presence_of and validate_uniqueness_of matchers, because they
      are from different libraries (one from active_model and the other from
      active_record respectively).
    
      This change allow the integration with multiple libraries. fixes #710
Commits on May 22, 2015
  1. @mcmire

    Add missing items to NEWS for 3.0.0

    mcmire authored
    [ci skip]
  2. @mcmire
  3. @mcmire

    Fail when no scopes on uniq matcher but scopes on validation

    mcmire authored
    Change behavior of `validate_uniqueness_of` when the matcher is not
    qualified with any scopes, but your validation is. Previously the
    following test would pass when it now fails:
    
        class Post < ActiveRecord::Base
          validate :slug, uniqueness: { scope: :user_id }
        end
    
        describe Post do
          it { should validate_uniqueness_of(:slug) }
        end
Commits on May 12, 2015
  1. @mcmire
Commits on Apr 20, 2015
  1. @maurogeorge @mcmire

    Create the allow_values matcher

    maurogeorge authored mcmire committed
    It is a alias to the actual allow_value matcher.
Commits on Apr 16, 2015
  1. @maurogeorge @mcmire

    Uniqueness matcher now works with boolean scopes

    maurogeorge authored mcmire committed
Commits on Apr 15, 2015
  1. @mcmire

    Add Code of Conduct to CONTRIBUTING

    mcmire authored
    [ci skip]
Commits on Apr 4, 2015
  1. @jacobsimeon @mcmire

    Add support for hbtm :join_table option

    jacobsimeon authored mcmire committed
    Rails supports declaring a `has_and_belongs_to_many` relationship with a
    custom `:join_table` option and some developers want to assert that the
    correct value is being used. Add `AssocationMatcher#join_table` to allow
    developers to test the following:
    
    1) That the :join_table option is being used for the relationship
    2) That the *correct value* is being used
    3) That the custom join table exists in the database
  2. @jacobsimeon @mcmire

    Fix calls to old method name.

    jacobsimeon authored mcmire committed
  3. @jacobsimeon @mcmire

    Explicitly test custom `:join_table` option #547

    jacobsimeon authored mcmire committed
    Some developers might want to pass a :join_table option to their HABTM
    association declarations (e.g., `has_and_belongs_to_many :posts,
    join_table: :users_and_their_posts). Those same developers, may want to
    explicitly test the existence of the join table. Make this possible.
  4. @jacobsimeon @mcmire

    Rename AssociationMatcher#join_table

    jacobsimeon authored mcmire committed
    Free up the `join_table` name so that users can specify a `join_table`
    option when testing their associations.
  5. @mcmire

    Add #on qualifier to numericality matcher

    mcmire authored
    This is present in all other matchers through ValidationMatcher.
    However, ValidateNumericalityOfMatcher does not inherit from
    ValidationMatcher. (This happens to be okay, since
    ValidateNumericalityOfMatcher contains submatchers and we have to make
    sure to pass the context all the way through.)
    
    Hat tip @sj26 for most of the content of this commit, as well as
    @anujbiyani for another approach to this.
Commits on Apr 3, 2015
  1. @mcmire

    Update installation instructions in README

    mcmire authored
    Also:
    
    * Mention RSpec before Minitest (since it's used more often)
    * Fix instructions on generating YARD documentation automatically
    * Make a new Contributing section
    * Use "Shoulda Matchers", not shoulda-matchers
    * Add notice that this is the README for the master branch
    
    [ci skip]
  2. @takiy33 @mcmire

    Use pry-byebug instead of pry-nav

    takiy33 authored mcmire committed
  3. @mcmire

    Update CONTRIBUTING

    mcmire authored
    * Make the headers smaller
    * Don't ask people to update the documentation
    * Don't install Ruby version globally, just install it locally
    
    [ci skip]
  4. @thavelick @mcmire

    Added dependency installation guide

    thavelick authored mcmire committed
    includes steps for Debian- and RedHat-based systems
Commits on Apr 2, 2015
  1. @mcmire
  2. @maurogeorge @mcmire

    The route matcher accepts a format as a symbol

    maurogeorge authored mcmire committed
Commits on Apr 1, 2015
  1. @mcmire
Commits on Mar 29, 2015
  1. @ignat-zakrevsky @mcmire

    Fix links to callback matchers in README

    ignat-zakrevsky authored mcmire committed
    [ci skip]
  2. @mcmire

    Replace watchr with Guard

    mcmire authored
    watchr has not been maintained for quite some time and no longer works
    properly with Ruby 2.2.
  3. @mrageh @mcmire

    Added strict option to Numericality matcher

    mrageh authored mcmire committed
  4. @maurogeorge @mcmire

    Add documentation to validate_numericality_of on qualifier

    maurogeorge authored mcmire committed
    [ci skip]
  5. @maurogeorge @mcmire

    Add documentation to validate_uniqueness_of on qualifier

    maurogeorge authored mcmire committed
    [ci skip]
  6. @maurogeorge @mcmire
  7. @maurogeorge @mcmire

    Add documentation to validate_length_of on qualifier

    maurogeorge authored mcmire committed
    [ci skip]
  8. @maurogeorge @mcmire

    Add documentation to validate_inclusion_of on qualifier

    maurogeorge authored mcmire committed
    [ci skip]
  9. @maurogeorge @mcmire

    Add documentation to validate_exclusion_of on qualifier

    maurogeorge authored mcmire committed
    [ci skip]
  10. @maurogeorge @mcmire

    Add documentation to validate_confirmation_of on qualifier

    maurogeorge authored mcmire committed
    [ci skip]
  11. @maurogeorge @mcmire

    Add documentation to validate_acceptance_of on qualifier

    maurogeorge authored mcmire committed
    [ci skip]
Something went wrong with that request. Please try again.