Fix some bug and add capabara and some test spec