From 76ab5b2efb7bebb50c8b3bcb916ea909e83eb29a Mon Sep 17 00:00:00 2001 From: Pistos Date: Tue, 11 Oct 2011 17:48:33 -0400 Subject: [PATCH] Whitespace cleanup. --- lib/statistics.rb | 2 +- spec/lib/statistics_spec.rb | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/lib/statistics.rb b/lib/statistics.rb index 8219a5c8a..fe0f172e7 100644 --- a/lib/statistics.rb +++ b/lib/statistics.rb @@ -87,7 +87,7 @@ SQL x_array = [] y_array = [] - self.result_hash(first_metric).keys.each do |k| + self.result_hash(first_metric).keys.each do |k| if val = self.result_hash(second_metric)[k] x_array << self.result_hash(first_metric)[k] y_array << val diff --git a/spec/lib/statistics_spec.rb b/spec/lib/statistics_spec.rb index 9b8b0180d..0f5d4628d 100644 --- a/spec/lib/statistics_spec.rb +++ b/spec/lib/statistics_spec.rb @@ -73,15 +73,15 @@ describe Statistics do end end - ["posts_count", "comments_count", "invites_sent_count", "tags_followed_count", + ["posts_count", "comments_count", "invites_sent_count", "tags_followed_count", "mentions_count", "sign_in_count", "contacts_sharing_with_count" ].each do |method| - + it "#{method}_sql calls where_sql" do @stats.should_receive(:where_clause_sql) @stats.send("#{method}_sql".to_sym) end - + if !["sign_in_count", "tags_followed_count"].include?(method) it "#generate_correlations calls correlate with #{method} and sign_in_count" do @stats.stub(:correlate).and_return(0.5) @@ -114,7 +114,7 @@ describe Statistics do @stats.generate_correlations[:posts_count].to_s.should == "1.0" end end - + describe "#correlate" do it 'calls correlation with post' do User.connection.should_receive(:select_all).and_return([{"id"=> 1, "count" => 7},