From 1dedfb22518db503ae9d61621d87c21b1f31d3d5 Mon Sep 17 00:00:00 2001 From: Emili Parreno Date: Thu, 29 Aug 2013 16:15:02 +0200 Subject: [PATCH] fix user_name_suggester spec --- spec/components/user_name_suggester_spec.rb | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/spec/components/user_name_suggester_spec.rb b/spec/components/user_name_suggester_spec.rb index 0922a0b0f68..a70be9afd10 100644 --- a/spec/components/user_name_suggester_spec.rb +++ b/spec/components/user_name_suggester_spec.rb @@ -10,6 +10,9 @@ describe UserNameSuggester do end describe '.suggest' do + before do + User.stubs(:username_length).returns(3..15) + end it "doesn't raise an error on nil username" do UserNameSuggester.suggest(nil).should be_nil @@ -67,4 +70,4 @@ describe UserNameSuggester do end end -end \ No newline at end of file +end