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