Rails4からはActiveSupport::TestCaseがTest::UnitからMiniTest::Unit::TestCaseのサブクラスに変わっている。 MiniTestはSpecなDSLをサポートしているので、RSpecを入れずともBDDスタイルでテストが書けるようになる。 ということで、いろいろtest_helper.rbをゴニョってたらminitest-rails-specというズバリなGemを見つけたので(><)これを使う。 minitest-spec-railsでやってくれることは、ざっくりいうと、RailsのActiveSupport::TestCaseにMinitest::Spec::DSLをextendして、ControllerとかHelperクラスをテスト対象クラスに追加して、beforeとかafterとかのDSLを使えるようにしてくれるだけというシンプルな
ICANN, the Internet Corporation for Assigned Names and Numbers, requires us to ask you as a Registrant of a domain name to verify your contact information for this domain with your provider. As a Registrant of a domain name, a new domain registration or changes to the first name, last name, contact address or email address of an existing domain name, requires verification of the information within
追記 2014-12-10 === この記事ですが、Ruby on Rails 3.2.x 系を前提にした内容となっており、 新しい Rails 4.0.x、4.1.x 系では少しやり方が異なります。 取り急ぎで申し訳ございませんが、とりあえず下記に、最新の Minitest の記事を紹介いたします。 A Guide to Testing Rails Applications — Ruby on Rails Guides (※英文) 追記ここまで === Ruby や Ruby on Rails で使用されるテストフレームワークは、何がポピュラーか? The Ruby Toolbox - Unit Test Frameworks RSpec が第1党で、次に Minitest という Test::Unit から置き換えられたフレームワークが人気だ。個人的には RSpec を使う機会が多かっ
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く