From 1a2114d87d35e5f5e3c4549311c8821dc3a7d8ee Mon Sep 17 00:00:00 2001 From: Godfrey Chan Date: Fri, 29 Nov 2013 21:58:09 -0800 Subject: [PATCH] Don't abuse as_json, it's not meant for consumption The `as_json` API is a hook for JSON encoders to call, not meant for consumption like this, and the result is not guarenteed to be stable across Rails versions. There might be other cases like this that we should revisit later, but this one in particular is causing a test to fail on Rails master. --- spec/components/discourse_updates_spec.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spec/components/discourse_updates_spec.rb b/spec/components/discourse_updates_spec.rb index f3d36e153e4..9f4f2b8b7fd 100644 --- a/spec/components/discourse_updates_spec.rb +++ b/spec/components/discourse_updates_spec.rb @@ -14,7 +14,7 @@ describe DiscourseUpdates do Jobs::VersionCheck.any_instance.stubs(:execute).returns(true) end - subject { DiscourseUpdates.check_version.as_json } + subject { DiscourseUpdates.check_version.instance_values } context 'version check was done at the current installed version' do before do