Permalink
Commits on Sep 19, 2017
  1. Update README

    mcmire committed Sep 19, 2017
    * Add section about upcoming release
    * Remove explicit instructions for using the master branch for Rails 5
      apps
    * Remove maintainer needed announcement
    * Update copyright
    
    [ci skip]
Commits on Sep 18, 2017
  1. Update Ruby versions that helper Appraisal scripts use

    mcmire committed Sep 18, 2017
    [ci skip]
Commits on Sep 17, 2017
  1. Refactor RailsShim

    mcmire committed Sep 17, 2017
    * Satisfy Rubocop
    * Alphabetize methods
    * Use `class << self` instead of `self.` so that we can privatize one of
      the methods
  2. Rails 5: Skip array-column-related tests for uniqueness matcher

    mcmire committed Jul 25, 2017
    For some reason, in Rails 5, the uniqueness validation has stopped
    working for array columns. What this means is that if you try to use an
    array column for a scope, then the query that the validation performs
    blows up because the value in the query for the scope is not an array
    but a regular scalar value. This does not seem to be documented
    anywhere, so perhaps this never worked to begin with, or it accidentally
    worked in Rails 4. Until we solve this mystery, skip the tests that have
    to do with array columns.
  3. Doublespeak: Define #respond_to_missing? on ObjectDouble

    mcmire committed Jul 25, 2017
    The `delegate_method` matcher uses Doublespeak internally to do its job.
    The delegate object is completely stubbed using an ObjectDouble,
    available from Doublespeak, which is shoulda-matchers's own test double
    library. ObjectDouble is a class that responds to every
    method by implementing `method_missing`.
    
    Say you are using Ruby 2.4 and you are testing a class that uses the
    Forwardable module to do some delegation, and you are using
    `delegate_method` in your test. When you run your test you will a
    warning that looks something like:
    
        Courier#deliver at ~/.rvm/rubies/ruby-2.4.0/lib/ruby/2.4.0/forwardable.rb:156 forwarding to private method #deliver
    
    Why is this happening? When the code in your class gets exercised,
    Forwardable will delegate the delegate method in question to
    ObjectDouble, and the method will get intercepted by its
    `method_missing` method. The fact that this is actually a private method
    is what Forwardable is complaining about.
    
    To fix this, all we need to do is add `respond_to_missing?` in addition
    to `method_missing?`. This is explained here:
    
        https://bugs.ruby-lang.org/issues/13326
  4. Add missing gems to 5.0 Appraisal

    mcmire committed Jul 25, 2017
  5. Fix #913 for Serialize Matcher error undefined method `cast_type' in …

    bsodmike committed with mcmire Oct 18, 2016
    …Rails 5
    
    This patch is based on the discussed held in issue #913, and a solution
    that I've proposed and others have confirmed as good to go 👏.
    
    Ref: #913 (comment)
  6. Rails 5: Fix built-in-test custom models w/ attrs

    mcmire committed Jul 25, 2017
    When a model was built in a unit test and it was configured to have
    attributes, when those attributes are set later, the test would blow up
    because we were not using `write_attribute` correctly.
  7. Remove typo

    mcmire committed Jul 25, 2017
  8. Don't autorequire Zeus when loading Rails for tests

    mcmire committed Jul 25, 2017
    Zeus has a lot of warnings and they appear for each test that is run.
  9. Disable allow_mass_assignment_of tests under Rails 5

    mcmire committed Jul 25, 2017
    The `allow_mass_assignment_of` matcher tests `attr_accessible` and
    `attr_protected` which was moved to the `protected_attributes` gem in
    Rails 4. The gem does not work in Rails 5 and neither does the matcher,
    so there is no need to test it. (We should probably remove the matcher
    altogether eventually -- Strong Parameters have long replaced
    `protected_attributes`.)
  10. Update rspec & rspec-rails to 3.6.x

    mcmire committed Jul 25, 2017
    This upgrade is mainly so we can use --only-failures which was
    introduced way back in RSpec 3.3.
  11. Remove TravisCI support for Ruby 2.0 and 2.1 and Rails 4.0 and 4.1

    guialbuk committed with mcmire Jul 5, 2017
    Remove TravisCI support for Ruby 2.0 and 2.1
    
    Merge Appraisal Gemfiles for different Ruby versions
    
    Remove unused variable in Appraisals file