I like the “specification” style of testing – it makes more sense to me than the “assertion” style. But I’ve recently switched from RSpec to Minitest (with Mocha). Why? RSpec is huge. It makes lovely tests that read like English, but it’s huge. Plus its recent switch from object.should == something to expect(object).to be == something negates some of the elegance of its syntax (although I understa
Myron MarstonFeb 3, 2015RSpec 3.2 has just been released! Given our commitment to semantic versioning, this should be a trivial upgrade for anyone already using RSpec 3.0 or 3.1, but if we did introduce any regressions, please let us know, and we’ll get a patch release out with a fix ASAP. RSpec continues to be a community-driven project with contributors from all over the world. This release incl
I’ve been using RSpec in earnest for the past 6 months now, so I thought it’s time to write a blurrrgh poast comparing RSpec with Minitest. I’ve used Minitest for years, and RSpec only for 6 months, so please keep that in mind when reading! PLEASE REMEMBER, I don’t care what test framework you use, as long as you are testing your code. This is a post just about my experience with these two framewo
Myron MarstonSep 4, 2014RSpec 3.1 has just been released! Given our commitment to semantic versioning, this should be a trivial upgrade for anyone already using RSpec 3.0, but if we did introduce any regressions, please let us know, and we’ll get a patch release out with a fix ASAP. RSpec continues to be a community-driven project with contributors from all over the world. This release includes 64
Myron MarstonMay 18, 2014The RSpec team has released 3.0.0.rc1 and 2.99.0.rc1! Barring a new major issue being reported, this will be the last prerelease, and we’ll release 2.99.0 and 3.0.0 final in 2 weeks. If you’re upgrading a project from 2.x, check out the upgrade instructions. If you’re curious about what’s new in RSpec 3, check back in a few days – I’ll be posting full list of notable chang
ちょっとCapybaraについて、整理する必要があったのでこちらで簡単にまとめておきます。Capybaraは、Githubのスタートページに使い方が丁寧に書いているので、そちらを参照したら大抵のことが解るようになっています。 What is Capybara Capybaraは、Webアプリケーションのインテグレーション・テストを補助する為のライブラリです。Capybaraが提供する本質的な機能としては、DSLとDriverの2点のみです。DSLとはドメイン固有言語で、特定の問題に特化したコンピュータ言語です。Capybaraはテスティングフレームワークを操作する命令を、それぞれのフレームワークに依存しない形で提供します。つまり、テスティングフレームワークであるCucumberやRSpec,Test::Unitなどを透過的に利用できます。次にドライバーです。Webアプリケーションのインテグ
OrgSync is now part of Campus Labs Campus Labs Engage is your comprehensive student engagement experience Streamline your processes with Organization Management Effortlessly plan and promote using comprehensive Event Planning Easily monitor event participation with mobile Involvement Tracking Empower students to discover opportunities with Guided Pathways Discover Engage
本日、私たちEverydayRails日本語版翻訳チームは『Everyday Rails – RSpecによるRailsテスト入門』のベータ版を公開しました。 本書はAaron Sumner氏のblogである Everyday Rails Blogの内容に基づく6つの章と本書の為に書き下ろした6つの章、本書の為のサンプルRailsアプリケーションで構成されています。 本書の日本語版翻訳チームのメンバーも本書でRSpecを学んでおり、オススメの良書です。 テストの有用性や便利なツールを説明しながら、実際のところのメリット・デメリットが書かれていて実践的な内容になっています。 著者のAaron氏はサンプルアプリケーションを使ってテストの組み込み方を説明しながら、それでもまずは自分自身のアプリケーションに対してテストを書いてみる事の重要性を説いています。 Railsアプリケーションは作った事はあ
Myron MarstonJan 14, 2014One of RSpec 3's big new features is shipping 3.0.0.beta2: composable matchers. This feature supports more powerful, less brittle expectations, and opens up new possibilities. An Example In RSpec 2.x, I've written code like this on many occassions: # background_worker.rb class BackgroundWorker attr_reader :queue def initialize @queue = [] end def enqueue(job_data) queue <<
We've developed a new syntax for message expectations in RSpec, which brings message expectations in line with the new expect syntax for state based expectations. This change required us to make a number of internal refactorings, so we're cutting a release candidate of RSpec, 2.14rc1, so that early adopters can try this new feature out. We encourage you to try out the release candidate and report
Myron MarstonJul 8, 2013We’ve just released RSpec 2.14. It will be the last 2.x feature release and is a recommended upgrade for all users. We’re getting started on RSpec 3. I’ll be blogging about our plans for RSpec 3 next week, so check back soon :). Thanks to all the contributors who helped make this RSpec release happen. Notable New Features Core: Profiler now profiles example groups, too RSpe
Maintaining balance while reducing duplication David Chelimsky Saturday, November 13, 2010 http://drw.com Saturday, November 13, 2010 http://rubygems.org/gems/rspec Saturday, November 13, 2010 http://relishapp.com/rspec Saturday, November 13, 2010 Saturday, November 13, 2010 http://pragprog.com/titles/achbd/the-rspec-book At printer on Nov 12! Saturday, November 13, 2010 This talk is not about RS
Puppet や Chef で構築したサーバを RSpec でテストする で書いた仕組みを使いやすくするために serverspec という名前で gem 化してみた。 rubygems.org にも登録してあるので、gem install でインストールできる。 $ gem install serverspec インストールしたら、適当なディレクトリで serverspec-init を実行。すると、雛形となるディレクトリやファイルを生成する。 $ serverspec-init + spec/ + spec/www.example.jp/ + spec/www.example.jp/httpd_spec.rb + spec/spec_helper.rb + Rakefile spec/www.example.jp/httpd_spec.rb がサンプルテストコードで、こんな感じになって
February 18, 2013 James Adam Welcome to part two of the the post series which will hopefully cauterize the bleeding stump that is my Ruby Testing Quest. This time, we will take a not-too-deep dive into how RSpec works. Last time we looked at MiniTest; if you haven’t already read that, it might be a better place to start than this. Let’s get going. A simple RSpec example Here’s a simple RSpec examp
RSpec is a Behaviour-Driven Development tool for Ruby programmers. BDD is an approach to software development that combines Test-Driven Development, Domain Driven Design, and Acceptance Test-Driven Planning. RSpec helps you do the TDD part of that equation, focusing on the documentation and design aspects of TDD. Documentation This is the official documentation site for RSpec. Much of the document
最近のRuby on Railsプロジェクトで使ってるもの・やっていることを紹介します。 rake setupちょっと前にこの記事を読んでやりたかったやつです。 Setting up a new machine for Ruby development by David of 37signals $ git clone git@your-server:you/your-repo.git $ rake setup すると、開発に必要な環境ができあがるというrake task。今いるプロジェクトではデータベースを作りなおして、開発環境用のテストデータを投入。テストデータのまとめ、各種URLなどを表示しています。 何かデータが変になったとか、まっさらの状態から動かしたいとか、そういう時はとにかくrake setupすればOK。 rake setupを一発叩けばアプリがそれなりに動く状態になる、っ
@a_matsuda Asakusa.rb 主宰 Forkwell社外取締役 begin 読めば分かるようなことは話しません 本日のお題 2つのメジャーバージョンアップ Ruby 1.9.3 → 2.0.0 Rails 3.2.9 → 4.0.0 Rake 10.0 RubyGems 2.0 RDoc 4.0 RSpec 3.0 など 空前のメジャーバージョンアップ期 心機一転参入のチャンス (色々切り替えていかないといけない) Ruby2.0 (Matz)長年の悲願 絵に描いた餅 燃料 人参 Perl6 (出ないと思われてた) 2003 1.8 その頃は偶数番号が安定版 2007 1.9 開発版(すごく不安定) →1.9.0は開発版 1.9.1が安定版でどうか(1.10.0とかは使いたくない) 2010.8 1.9.2 安定版 2011.10 1.9.3 安定版 2013.2.24 2.
そらはーです! RSpec で pending 使ってテストを一時的に無効化した事ある方は大勢いらっしゃるんじゃないでしょうか! なんらかの事情で一時的に pending せざるを得ない状況ならともかく、pending したなら責任をもって該当のテストを治すか、そもそも不要なら消すなどといった対処をしてもらいたいものですね! でも、実際来週までには!とか言っても放置する人間や、そもそも直さず1年,2年以上放置される事もしばしばあるのが現実です……… pending を放置する事によって、実はそれは(他の人にとって)かなり重要なテストで、そんなテストがpendingされてる訳ないと思った、他のメンバーによる変更で実はそのテストがコケて事故っていたという可能性も存在するわけです。 重要なテストをAさんが pending する (「テストは追って修正する」みたいな感じで) 比較的大きめの変更を
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く