Refine RSpec tests