You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session. You switched accounts on another tab or window. Reload to refresh your session. Dismiss alert
After creating cheat sheets for RSpec::Core and RSpec::Expectations, I think it is only fair to have a cheat sheet for Minitest too. Minitest also provides an optional RSpec-like DSL, which is not covered here. Minitest is a small (some might say “mini”) testing framework, where tests are written in “plain Ruby,” as opposed to using a custom DSL. It has a gentler learning curve than RSpec, and is
Learn to test with confidence Learning to test your Ruby and Rails code can be tough. Even after you've been through blog posts and tutorials, screencasts and demo apps, you might find yourself feeling more lost than ever. Ruby and Rails developers emphasize testing for good reasons, and you want to get on board, but even so, it can be damn hard to learn. You just want to write tests that tell you
本ガイドは、Railsでテストを書く方法について解説します。 このガイドの内容: Railsテスティング用語 アプリケーションに対する単体テスト、機能テスト、結合テスト、システムテスト(system test)の実施 その他の著名なテスティング方法とプラグインの紹介 1 Railsアプリケーションでテストを作成する理由 自動実行されるテストを書いておけば、ブラウザやコンソールでの手動テストよりも、コードが期待どおりに動作していることをより短時間で確認できます。テストが失敗すれば問題がすぐに明らかになり、開発プロセスの早い段階でバグを特定して修正できるようになります。テストの自動化によって、コードの信頼性が向上するだけでなく、変更に対する信頼性も向上します。 Railsでは、テストを簡単に記述できます。Railsに組み込まれているテストのサポートについては、次のセクションで詳しく説明します。
Railsのプラグインは、コアフレームワークの拡張や変更に使われます。プラグインは以下の機能を提供します。 安定版コードベースを変更せずに、最先端のアイデアを共有できます。 アーキテクチャを分割して、修正や更新を異なるスケジュールで進められます。 コア開発者が新機能の一部のみを共有するのに使えます。 このガイドの内容: プラグインをゼロから作成する方法 プラグイン用のテストの作成方法と実行方法 本ガイドでは以下を理解するために、テスト駆動方式によるプラグイン開発方法を解説します。 HashやStringなどのコアRubyクラスを拡張する acts_asプラグインと同様の手法でApplicationRecordにメソッドを追加する ジェネレータをプラグインのどこに配置するかを理解する ここからは説明上、自分のことを熱烈なバードウォッチャーであるとお考えください。 あなたは鳥の中でも特にYaf
I tend to use before blocks to set instance variables. I then use those variables across my examples. I recently came upon let(). According to RSpec docs, it is used to ... to define a memoized helper method. The value will be cached across multiple calls in the same example but not across examples. How is this different from using instance variables in before blocks? And also when should you use
What is Better Specs Better Specs is a collection of best practices developers learned while testing apps that you can use to improve your coding skills, or simply for inspiration. Better Specs came to life at Lelylan (open source IoT cloud platform) and checking out its test suite may be of inspiration. Better Specs focus on Rails testing, but our goal is to create testing guidelines covering mos
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く