Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/git/git-scm.com.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorJeff King <peff@peff.net>2020-12-13 01:56:50 +0300
committerJeff King <peff@peff.net>2020-12-13 01:56:50 +0300
commite747cb8be52498d84e17536100f3d6132da9bde0 (patch)
treeca6cd246a7a9005cc5ae92adb7ed45aeac3bcfa3 /test
parent896ea93ce46c13a5d27f888577391807de8f08d8 (diff)
test: do some shoulda-matcher setup
Without this, I get problems with utility methods like have_many being undefined. I'm not sure if there's a better way to solve this, but this solution came from: https://teamtreehouse.com/community/solved-undefined-method-havemany-for-childtestclass-problem-with-shouldamatchers-313
Diffstat (limited to 'test')
-rw-r--r--test/test_helper.rb7
1 files changed, 7 insertions, 0 deletions
diff --git a/test/test_helper.rb b/test/test_helper.rb
index 19d3d47b..ebf83803 100644
--- a/test/test_helper.rb
+++ b/test/test_helper.rb
@@ -4,6 +4,13 @@ ENV["RAILS_ENV"] = "test"
require File.expand_path("../../config/environment", __FILE__)
require "rails/test_help"
+Shoulda::Matchers.configure do |config|
+ config.integrate do |with|
+ with.test_framework :minitest
+ with.library :rails
+ end
+end
+
class ActiveSupport::TestCase
# Setup all fixtures in test/fixtures/*.(yml|csv) for all tests in alphabetical order.
#