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
During my Test-Driven Rails workshop earlier this week (which is also available as an online workshop), my students and I were writing acceptance tests surrounding marking todo items as complete. The spec looked like this: feature 'Manage todos' do scenario 'view only todos the user has created' do sign_in_as '[email protected]' create_todo_titled 'Lay eggs' sign_in_as '[email protected]' user_should
How many times has this happened to you: You get some code working locally, have an awesome test suite that covers all the possible code paths, you deploy and tell your client/boss, and they come back with “I got an error right away, don’t you test this stuff?!?” It is crushing to hear, and frustrating because no matter how great your test suite was, something went wrong and you look like a fool.
Konacha is a testing tool for JavaScript applications running on Rails. Why Konacha? It’s very fast. It treats JavaScript like a first-class citizen: Your tests are written in JavaScript, call into JavaScript code, and inspect JavaScript objects. You can still trigger events, e.g. with jQuery, if you need to simulate user actions. It comes with support for the Rails asset pipeline. [1] It supports
NOTE: TConsole isn't compatible with the latest version of MiniTest, and (very sadly) I don't have enough free time to devote to it at the moment. It's a wonderful tool though, so I've every intention of getting it back up and running at some point. -- Graham Ashton TConsole is a testing console for Rails. It allows you to issue commands concerning what tests to run, and see their test output. It'
このエントリでは,Ruby on Rails (以下 Rails)の ActiveRecord モデルテストについて,1) どこの何をテストすればよいか,2) どのようにテストを書けばよいか,のガイドラインを示します.このガイドラインは Rails 公式のものではなく,id:passingloop が使っている私的なものです.疑問・質問・批判・間違いの指摘はページ下部のコメント欄までお願いします. はじめに Rails は TDD/BDD サポートが充実した Web アプリケーション開発フレームワークです.Rails で使える Test::Unit や RSpec などといったテスティングフレームワークの使い方に関する解説も豊富にあります.しかし,「どこをどうテストすればよいのか」についての解説は,「使い方」の解説と比較して少ないように思います.もっとも,テスト一般についてどう書くかはアプ
Collective Idea Home Blog Home Blog Contact Photo by Tambako the Jaguar, used under Creative Commons https://flic.kr/p/dJD2dV We frequently swap out Firefox for Chrome in our selenium (@javascript) cucumber tests. It is actually very easy, but not widely known. Update: I got some questions about **why** we'd use Chrome. Speed hasn't been the issue (use capybara-webkit for that) but we have found s
Ruby Weekly is a weekly newsletter covering the latest Ruby and Rails news. VCR is a library by Myron Marston that records your test suite's HTTP interactions so that they can be quickly replayed during future test runs. The big win is that you get predictable, quick and accurate tests. If you need to update the data, just delete the fixtures VCR generates and you're good to go. On the surface, VC
近頃はWebAPIを使ったアプリケーションを作ることが増えていると思いますが、自動化テストからのWebAPIへのアクセスはどうやってますか? 私は、自分でstubしたりFakeWeb(レシピ先輩に教わった!!)を使ったりしてたんですが、イマイチしっくりこない部分がありました。で、Sinatraなぞで作ってたんですが、それをgemにまとめましたので、よろしければご利用ください。 http://github.com/moro/ww http://gemcutter.org/gems/ww 概要 ww(Double Web)はいわゆるDouble(mock, stub, spyなど)の機能を備えたダミーWebサーバを簡単に作るためのフレームワーク(笑)です。現状では、以下のようなことが出来ます。 他のAPIサーバを使う場合などに、簡単にダミーサーバを作る そのダミーサーバは自動化テストないから起
Meet Dataset: The Fixture-Killing, Data-Loading Framework Posted by John on December 12th, 2008 My good friend and partner Adam Williams has just finished bolting the doors on his new YAML-fixture-killing Rails plugin: Dataset. Dataset is the next generation of a plugin that Adam and I wrote last year called Scenarios. Why the need for a new plugin? The Scenarios plugin was originally built inside
= Dataset Dataset provides a simple API for creating and finding sets of data in your database. Check out Dataset::RecordMethods and Dataset::ModelFinders. Dataset loads data intelligently if you use 'nested contexts' in your tests (RSpec, anything that uses Test::Unit::TestCase subclassing for creating nested contexts): describe Something do dataset :a => Dataset :a is loaded (at the right time)
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く