User model: injected  methods and added Rspec test