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
spec_helper.rbの中でRSpec.configure を呼び出している場合、 以下のような警告が出てくることがあります。 1 ****************************************************** 2 DEPRECATION WARNING: you are using deprecated 3 behaviour that will be removed from RSpec 3. 4 5 You have set some configuration options after an 6 example group has already been defined. In RSpec 3, 7 this will not be allowed. All configuration should 8 happen befor
describe("Jasmine", function() { it("makes testing JavaScript awesome!", function() { expect(yourCode).toBeLotsBetter(); }); }); Documentation User Guide Release Notes API Documentation Contributor Guide Download For pure JavaScript projects: VersionSizeDateSHA1
Rails3 でプロジェクトを作成し、RSpec と RCov を日本語で動作させるまでの手順です。 rails (3.0.0) や rspec (2.0.0.beta.22) 等の必要な gem は既にインストールされているものとします。 まずは、普通に Rails プロジェクトを作成して、config/database.yml を開発環境に合わせて設定しておきます。 $ rails new project create create README create Rakefile create config.ru create .gitignore create Gemfile : : プロジェクト内にて RSpec と RCov を使用するために Gemfile に下記を追記します。 gem "rcov" group :test do gem 'rspec-rails', '>= 2.
Choose a project RSpec Behaviour Driven Development framework for Ruby 6 imported versions - 25 notes - Browse - Search Ruby on Rails The open source web application framework for the Ruby programming language 27 imported versions - 1313 notes - Browse - Search Ruby A dynamic, open source programming language with a focus on simplicity and productivity 12 imported versions - 370 notes - Browse - S
Can't see nothing but the source code Java development with an iPhone touch pad for the Atari 2600 from an urban hip-hop perspective Is anybody doing this yet? I made an effort to use RSpec for iPhone development almost a year ago but got stumped on Ruby mock objects that didn’t seem to to play nice with CocoaTouch objects. I got a lot closer than my blog post would lead you to believe but stopped
Yesterday we were deep in the middle of coding using RSpec 2 and Rails 3 and needed to verify that a method made a specific http request. I happily discovered WebMock, which appears to be a next generation FakeWeb. Originally developed by Bartosz Blimke, I was happy to see that Sam Phillips had it working with Rspec 2 and Rails 3. I found the following posts helpful: RSpec 2 on Rails 3 using bundl
RSpec-2 is getting close to a release candidate, and as the beta gems have been flowing a lot of questions have been coming in, especially about documentation. Here is some information that should help. Source code RSpec development has moved to the rspec account on github. There are five repositories at the moment: http://github.com/rspec/rspec http://github.com/rspec/rspec-core http://github.com
We’ve started to do some preliminary work on rspec-2.0, which we plan to release before Rails-3 goes final. At that point, the rspec-rails-2.0 plugin/gem will only work with rspec >= 2.0 and rails >= 3.0. We’re committed to making the upgrade from rspec-1.x to rspec-2.0 as seamless as possible for most users, but extenders are going to see some differences. This is why we’re going to take our time
和田 卓人(@t_wada) 作『RSpec の入門とその一歩先へ』はクリエイティブ・コモンズ 表示 - 継承 4.0 国際 ライセンスで提供されています。 東京 Ruby 会議 03 の RSpec ワークショップの資料です。このワークショップでは参加者の方に「写経」(コードを書き写すこと)をして貰い、TDD/BDD と RSpec を同時に学べるように都度説明を入れるかたちで行いました。 第2イテレーションも書きました。続きに興味ある方はご覧下さい (更新) 第3イテレーションも書きました。続きに興味ある方はご覧下さい 1st iteration favotter の みたいな NG ワードのフィルタリング機能を RSpec で作りましょう。まずは NG ワードの検出機能を作成します。 このイテレーションでは最初ベタな形のテストコードと実装を書き、だんだんとそのコードを洗練させてゆきま
東京Ruby会議03に参加してきました。もともと並カンで宣伝してたのが縁というかきっかけで、ここ最近Rubyに手こずっていたので、何かのきっかけになればと思って参加しました。最近疲れ気味だったので午前中のメタプログラミングの話はちょっと失礼して、午後のハンズオンから参加してきました。場所は例によって青山オラクルセンター。一昨日も行きましたね、はい。(写真は、記事の内容とはほとんど関係ありません) 参加したのは id:t-wada さんのRSpec入門。ひたすら写経するというスパルタ(?)…もとい、手を動かすのは大切なことです。昔ちょっとだけ気になっていたテーマ「テストコードのテストはどうやるの?」について明確な答えが得られたので、それだけでも十分な収穫でした。ちなみにこの質問を社内でやったときは「ひたすら頑張ってレビュー」との答えが得られたのですが、質問した当時は「そんなもんかぁ」と思った
この間 BPStudy#29 に参加してきました BPStudy - connpass そこで TDD とペアプロを行なってきました。 やってみた感想 TDDに関しては、言われた通りの事が実感できました。 たとえば、テストを書く時点でインターフェイスについて考えるとか。 ただ、絶望的な問題があった テストを実行するのが面倒という点。 編集する→テスト(テストコマンドを実行)する、というのはまったくもって刺身たんぽぽな作業であり、DRYですらない。 で、以前からZenTest というのは聞いていたので、その環境を構築しておくべきだった、と痛感した。 なので、環境をつくってみたよ autotest による RSpec の自動テストと、その結果を Growl に通知するように設定しました。 gemのインストール sudo gem install zentest sudo gem install
RSpecはDSLなので、決め事を覚えないと使いこなせない。 よく使うことになるであろう、参考リンクを列挙しておく。 前処理、後処理 xUnitでおなじみのsetUp()、tearDown()ではなく、before、afterを使うbefore、afterは複数定義できる参考:before / after メソッド # Rubyist Magazine - スはスペックのス 【第 1 回】 RSpec の概要と、RSpec on Rails (モデル編) aeertion(expectation) テストに成功したかどうかは、「xxx.should xxx」または「xxx.should_not xxx」という文で判定するshould(またはshould_not)の後ろに付けるの(matcherという)は、演算子(「== 123」とか)の他、予め用意されたmatcherが使える参考:エクスペ
TDDで開発している人の目下の悩みはSlow test問題、すなわちテストの実行時間がかかりすぎて辛い、という問題です。 が、ふと思うところがあって、次のようなタスクを定義していたら、なんということでしょう、劇的に早くなったではありませんか。 namespace :spec do spec_prereq = Array(File.exist?(File.join(RAILS_ROOT, 'config', 'database.yml')) ? "db:test:prepare" : :noop) desc "faster version of rake spec, but why?" task :faster => spec_prereq do %w[spec:models spec:controllers spec:views spec:helpers spec:lib].each do
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く