add rspec and refactoring
Merge pull request #2 from ogawaso/rspec

add rspec and refactoring