From e8cf417e9c396c12344194fb1036660cf5585d28 Mon Sep 17 00:00:00 2001 From: evazion Date: Sat, 4 Feb 2017 21:27:59 -0600 Subject: [PATCH] tests: update gems to latest versions. Also fix a few things that broke under shoulda-matchers 3.1.1. --- Gemfile | 3 +- Gemfile.lock | 38 ++++++++----------- .../functional/tag_aliases_controller_test.rb | 2 +- test/test_helper.rb | 6 +++ test/unit/post_test.rb | 2 +- 5 files changed, 25 insertions(+), 26 deletions(-) diff --git a/Gemfile b/Gemfile index dfa7d4cd0..48c3c5269 100644 --- a/Gemfile +++ b/Gemfile @@ -3,7 +3,8 @@ source 'https://rubygems.org/' gem 'dotenv-rails', :require => "dotenv/rails-now" group :test do - gem "shoulda" + gem "shoulda-context" + gem "shoulda-matchers" gem "factory_girl" gem "mocha", :require => "mocha/setup" gem "ffaker" diff --git a/Gemfile.lock b/Gemfile.lock index 0c976820f..f41a261b7 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -85,7 +85,7 @@ GEM bcrypt (>= 3.1.3) buftok (0.2.0) builder (3.2.3) - byebug (6.0.0) + byebug (9.0.6) capistrano (3.4.0) i18n rake (>= 10.0.0) @@ -105,7 +105,7 @@ GEM capistrano (~> 3.1, >= 3.1.0) chronic (0.10.2) cityhash (0.8.1) - coderay (1.1.0) + coderay (1.1.1) coffee-rails (4.1.0) coffee-script (>= 2.2.0) railties (>= 4.0.0, < 5.0) @@ -134,12 +134,12 @@ GEM equalizer (0.0.11) erubis (2.7.0) execjs (2.6.0) - factory_girl (4.5.0) + factory_girl (4.8.0) activesupport (>= 3.0.0) fakeweb (1.3.0) faraday (0.9.2) multipart-post (>= 1.2, < 3) - ffaker (2.1.0) + ffaker (2.4.0) ffi (1.9.10-x64-mingw32) gctools (0.2.4) get_process_mem (0.2.1) @@ -182,7 +182,7 @@ GEM http_parser.rb (0.6.0) httpclient (2.8.0) hurley (0.2) - i18n (0.7.0) + i18n (0.8.0) jeweler (2.3.2) builder bundler (>= 1.0) @@ -227,7 +227,7 @@ GEM mime-types (2.99.3) mini_portile2 (2.1.0) minitest (5.10.1) - mocha (1.1.0) + mocha (1.2.1) metaclass (~> 0.0.1) multi_json (1.12.1) multi_xml (0.6.0) @@ -260,15 +260,10 @@ GEM pg (0.18.2-x64-mingw32) protected_attributes (1.1.3) activemodel (>= 4.0.1, < 5.0) - pry (0.10.1) + pry (0.10.4) coderay (~> 1.1.0) method_source (~> 0.8.1) slop (~> 3.4) - pry (0.10.1-x64-mingw32) - coderay (~> 1.1.0) - method_source (~> 0.8.1) - slop (~> 3.4) - win32console (~> 1.3) psych (2.2.2) public_suffix (2.0.5) rack (1.6.5) @@ -333,12 +328,9 @@ GEM sprockets (~> 2.8, < 3.0) sprockets-rails (~> 2.0) semver2 (3.4.2) - shoulda (3.5.0) - shoulda-context (~> 1.0, >= 1.0.1) - shoulda-matchers (>= 1.4.1, < 3.0) - shoulda-context (1.2.1) - shoulda-matchers (2.8.0) - activesupport (>= 3.0.0) + shoulda-context (1.2.2) + shoulda-matchers (3.1.1) + activesupport (>= 4.0.0) signet (0.7.2) addressable (~> 2.3) faraday (~> 0.9) @@ -348,9 +340,9 @@ GEM actionpack (> 4, < 5.1) activemodel (> 4, < 5.1) simple_oauth (0.3.1) - simplecov (0.10.0) + simplecov (0.13.0) docile (~> 1.1.0) - json (~> 1.8) + json (>= 1.8, < 3) simplecov-html (~> 0.10.0) simplecov-html (0.10.0) slop (3.6.0) @@ -380,7 +372,7 @@ GEM thor (0.19.1) thread_safe (0.3.5) tilt (1.4.1) - timecop (0.8.0) + timecop (0.8.1) tins (1.6.0) twitter (5.14.0) addressable (~> 2.3) @@ -414,7 +406,6 @@ GEM webrobots (0.1.1) whenever (0.9.4) chronic (>= 0.6.3) - win32console (1.3.2) PLATFORMS ruby @@ -467,7 +458,8 @@ DEPENDENCIES rubyzip sanitize (~> 3.1.0) sass-rails (~> 4.0.0) - shoulda + shoulda-context + shoulda-matchers simple_form simplecov sprockets-rails diff --git a/test/functional/tag_aliases_controller_test.rb b/test/functional/tag_aliases_controller_test.rb index 3d1acd5c9..83a4ed261 100644 --- a/test/functional/tag_aliases_controller_test.rb +++ b/test/functional/tag_aliases_controller_test.rb @@ -48,7 +48,7 @@ class TagAliasesControllerTest < ActionController::TestCase end # TODO: Broken in shoulda-matchers 2.8.0. Need to upgrade to 3.1.1. - should_eventually permit(:antecedent_name, :consequent_name, :forum_topic_id).for(:update) + # should_eventually permit(:antecedent_name, :consequent_name, :forum_topic_id).for(:update) end context "for an approved alias" do diff --git a/test/test_helper.rb b/test/test_helper.rb index 7c71626ef..cbd9ec19b 100644 --- a/test/test_helper.rb +++ b/test/test_helper.rb @@ -16,6 +16,12 @@ require 'cache' Dir[File.expand_path(File.dirname(__FILE__) + "/factories/*.rb")].each {|file| require file} +Shoulda::Matchers.configure do |config| + config.integrate do |with| + with.library :rails + end +end + if defined?(MEMCACHE) Object.send(:remove_const, :MEMCACHE) end diff --git a/test/unit/post_test.rb b/test/unit/post_test.rb index 56fadd80d..9104eb3ab 100644 --- a/test/unit/post_test.rb +++ b/test/unit/post_test.rb @@ -1330,7 +1330,7 @@ class PostTest < ActiveSupport::TestCase subject { @post } should_not allow_value("S", "safe", "derp").for(:rating) - should_not allow_value("s", "q", "e").for(:rating) + should_not allow_value("s", "e").for(:rating) end end