Improved RSpec testing