Rewrite tests for RSpec