action_controllerの拡張gemを作成するときにrspecでテストする ユーザ認証のサンプルgemをTDDで作っていきましょう まずは、gemのひな形を作る $ bundle gem user_auth bundlerが1.9系なら以下のファイルが作成されてるはず ├── Gemfile ├── LICENSE.txt ├── README.md ├── Rakefile ├── bin │ ├── console │ └── setup ├── lib │ ├── user_auth │ │ └── version.rb │ └── user_auth.rb ├── spec │ ├── spec_helper.rb │ └── user_auth_spec.rb └── user_auth.gemspec さて、ここから本題です ゴールはこ
![action_controllerの拡張gemをRSpecでTDD ٩( ‘ω’ )و - Murajun's Style](https://cdn-ak-scissors.b.st-hatena.com/image/square/8c01b73d7c7c318dc1247e63ba1e7d0e1a9e0303/height=288;version=1;width=512/http%3A%2F%2Fcdn-ak.f.st-hatena.com%2Fimages%2Ffotolife%2Fm%2Fmurajun1978%2F20150415%2F20150415030247.png)