diff options
Diffstat (limited to 'spec/support_specs')
-rw-r--r-- | spec/support_specs/helpers/active_record/query_recorder_spec.rb | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/spec/support_specs/helpers/active_record/query_recorder_spec.rb b/spec/support_specs/helpers/active_record/query_recorder_spec.rb index 0827ce37b07..d15fbb5d4c3 100644 --- a/spec/support_specs/helpers/active_record/query_recorder_spec.rb +++ b/spec/support_specs/helpers/active_record/query_recorder_spec.rb @@ -3,8 +3,12 @@ require 'spec_helper' describe ActiveRecord::QueryRecorder do - class TestQueries < ActiveRecord::Base - self.table_name = 'schema_migrations' + before do + stub_const('TestQueries', Class.new(ActiveRecord::Base)) + + TestQueries.class_eval do + self.table_name = 'schema_migrations' + end end describe 'detecting the right number of calls and their origin' do |