Rspec shared to test max value attribute