Fix testcases for RSpec