履歴: ソフトウェア/rails/ActiveSupport_TestCase + shoulda によるテスト
各行は、その日時に書かれた内容です。追加・削除は、1 つ前の版との行数の差です (全 13 版)。「差分」は比較する版、「基準」は比べる相手の版を選びます
| 日時 | タイトル | 文字数 | 追加 | 削除 | 内容 | 差分 | 基準 |
|---|---|---|---|---|---|---|---|
| 2014/6/2 9:53:59 | ソフトウェア/rails/ActiveSupport_TestCase + shoulda によるテスト 最新版 | 39,445 | +1 | -1 | 表示 | 差分 | — |
| 2014/6/2 9:53:59 | ソフトウェア/rails/ActiveSupport_TestCase + shoulda によるテスト | 39,451 | +6 | -1 | 表示 | 差分 | 選択 |
| 2014/5/30 14:33:33 | ソフトウェア/rails/ActiveSupport_TestCase + shoulda によるテスト | 39,363 | +2 | -0 | 表示 | 差分 | 選択 |
| 2014/5/30 14:32:24 | ソフトウェア/rails/ActiveSupport_TestCase + shoulda によるテスト | 39,288 | +116 | -17 | 表示 | 差分 | 選択 |
| 2014/5/30 7:58:45 | ソフトウェア/rails/ActiveSupport_TestCase + shoulda によるテスト | 36,014 | +229 | -0 | 表示 | 差分 | 選択 |
| 2014/5/26 4:31:48 | ソフトウェア/rails/ActiveSupport_TestCase + shoulda によるテスト | 29,846 | +11 | -4 | 表示 | 差分 | 選択 |
| 2014/5/26 4:31:48 | ソフトウェア/rails/ActiveSupport_TestCase + shoulda によるテスト | 29,608 | +30 | -0 | 表示 | 表示中 | 選択 |
| 2014/5/24 1:25:48 | ソフトウェア/rails/ActiveSupport_TestCase + shoulda によるテスト | 28,564 | +1 | -1 | 表示 | 差分 | 基準 |
| 2014/5/23 17:42:25 | ソフトウェア/rails/ActiveSupport_TestCase + shoulda によるテスト | 27,825 | +163 | -0 | 表示 | 差分 | 選択 |
| 2014/5/23 13:25:19 | ソフトウェア/rails/ActiveSupport_TestCase + shoulda によるテスト | 21,221 | +174 | -2 | 表示 | 差分 | 選択 |
| 2014/5/23 3:13:32 | ソフトウェア/rails/ActiveSupport_TestCase + shoulda によるテスト | 15,654 | +253 | -88 | 表示 | 差分 | 選択 |
| 2014/5/22 14:25:52 | ソフトウェア/rails/ActiveSupport_TestCase + shoulda によるテスト | 12,435 | +167 | -47 | 表示 | 差分 | 選択 |
| 2014/5/22 13:28:26 | ソフトウェア/rails/ActiveSupport_TestCase + shoulda によるテスト | 9,057 | — | — | 表示 | — | 選択 |
基準: ソフトウェア/rails/ActiveSupport_TestCase + shoulda によるテスト (2014/5/24 1:25:48) → 比較: ソフトウェア/rails/ActiveSupport_TestCase + shoulda によるテスト (2014/5/26 4:31:48)
@@ -897,17 +897,47 @@
ActionModel の
-allow_value
+-- allow_value('http://foo.com', 'http://bar.com/baz').for(:website_url)
+-- allow_value('2013-01-01').for(:birthday_as_string).on(:create)
+-- allow_value('open', 'closed').for(:state).with_message('State must be open or closed')
ActionController の
-redirect_to
+-- redirect_to :list
+-- redirect_to { posts_path }
-render_template
+-- render_template 'show'
+-- render_template :show
-respond_with
+-- respond_with 403
+-- respond_with :success
+-- respond_with 500..600
+-route
+-- route(:get, '/posts').to(controller: 'posts', action: 'index')
+-- route(:get, '/posts/1').to('posts#show', id: 1)
-set_session
+-- set_session :key
+-- set_session(:key).to("value")
+-- set_session(:key).to{ calc_expectation }
-set_the_flash
+-- set_the_flash
+-- set_the_flash.to('value')
+-- set_the_flash.to(/regexp/)
+-- set_the_flash[:key]
+-- set_the_flash[:key].to('value')
+-- set_the_flash[:key].to(/regexp/)
+-- set_the_flash[:key].now
+-- set_the_flash[:key].to('value').now
くらいかもしれません。
+** matcher の作り方 [#m38d0482]
+
+set_session のコードを見れば一通り分かりそうですね。
+
+https://github.com/thoughtbot/shoulda-matchers/blob/master/lib/shoulda/matchers/action_controller/set_session_matcher.rb
+
* 役立ちそうな記事 [#x64e134e]
- http://www.railstips.org/blog/archives/2009/02/21/shoulda-looked-at-it-sooner/