From 46ea7e438675d6a5d06f1e993879e41704632914 Mon Sep 17 00:00:00 2001 From: Luke Baker Date: Mon, 17 Oct 2011 15:01:20 -0400 Subject: [PATCH] remove deprecation warnings from tests --- app/models/choice.rb | 2 +- app/models/question.rb | 2 +- spec/integration/questions_spec.rb | 2 +- test/factories/density.rb | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/app/models/choice.rb b/app/models/choice.rb index b539359..46a71df 100644 --- a/app/models/choice.rb +++ b/app/models/choice.rb @@ -40,7 +40,7 @@ class Choice < ActiveRecord::Base if self.changed.include?('active') && self.active? self.question.mark_prompt_queue_for_refill if self.question.choices.size - self.question.inactive_choices_count > 1 && self.question.uses_catchup? - self.question.send_later :add_prompt_to_queue + self.question.delay.add_prompt_to_queue end end end diff --git a/app/models/question.rb b/app/models/question.rb index ea82911..9cb23d5 100644 --- a/app/models/question.rb +++ b/app/models/question.rb @@ -83,7 +83,7 @@ class Question < ActiveRecord::Base else record_prompt_cache_hit end - self.send_later :add_prompt_to_queue + self.delay.add_prompt_to_queue return next_prompt else #Standard choose prompt at random diff --git a/spec/integration/questions_spec.rb b/spec/integration/questions_spec.rb index cbad7da..68aebe3 100644 --- a/spec/integration/questions_spec.rb +++ b/spec/integration/questions_spec.rb @@ -83,7 +83,7 @@ describe "Questions" do response.body.should have_tag("question", @questions.size) votes.each_value do |vs| count = vs.select{|v| v.created_at > date}.size - response.body.should have_tag"recent-votes", :text => count + response.body.should have_tag("recent-votes", :text => count) end end diff --git a/test/factories/density.rb b/test/factories/density.rb index db0f878..22d8ca5 100644 --- a/test/factories/density.rb +++ b/test/factories/density.rb @@ -1,5 +1,5 @@ Factory.define :density do |density| density.question_id density.value - density.type { 'string' } + density.class { 'string' } end -- libgit2 0.21.2