From 59cae397d88b3033ef3f1b072e998b796e2211e6 Mon Sep 17 00:00:00 2001 From: Jared Beck Date: Tue, 17 Nov 2015 23:59:35 -0500 Subject: [PATCH] Fix NameError: uninitialized constant JsonVersion --- spec/models/json_version_spec.rb | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/spec/models/json_version_spec.rb b/spec/models/json_version_spec.rb index ac6b0cfc..694f8771 100644 --- a/spec/models/json_version_spec.rb +++ b/spec/models/json_version_spec.rb @@ -1,6 +1,8 @@ -if JsonVersion.table_exists? +require 'rails_helper' - require 'rails_helper' +# The `json_versions` table tests postgres' `json` data type. So, that +# table is only created when testing against postgres and ActiveRecord >= 4. +if JsonVersion.table_exists? describe JsonVersion, :type => :model do it "should include the `VersionConcern` module to get base functionality" do