Skip to content

Instantly share code, notes, and snippets.

@miyohide
Created June 29, 2014 12:06
Show Gist options
  • Save miyohide/f37ce2cc9b0e90e845ca to your computer and use it in GitHub Desktop.
Save miyohide/f37ce2cc9b0e90e845ca to your computer and use it in GitHub Desktop.
Everyday Rails Rspec第5章復習

49ページ

attributes_forについて

属性のHashを返します。 https://github.com/thoughtbot/factory_girl/wiki/Usage#using-factories

changeマッチャについて

https://www.relishapp.com/rspec/rspec-expectations/v/2-0/docs/matchers/expect-change

50ページ

itの文言

itの文言が最初に書いてあるものとは異なるけど、気にしない。

12行目のeqについて

53ページ

非CRUDなメソッドをテストする

  • まずは最初、テストを書いてみましょう。
  • その後はエラーメッセージに従い、実装していきます。
  • routes.rbの実装は次のサイトが参考になるでしょう。
  • hidden?メソッドとかの仕様は決まっていないので、適当に書いてみましょう。
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment