You need 2 tests for this. First one to check if username is nil if user is nil, so it would look like this:

    Comment.new.username.should == nil

And that's it. Second test should check if username is actually delegated, so:

    user = FactoryGirl.create(:user, username: "Test username")
    FactoryGirl.build(:comment, user: user).username.should == "Test username"

And that would be just enough.