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
WEB+DB PRESS Vol.89 の いまどきのRSpecテスト が良かったです。 日本人で唯一のRSpec core teamに所属するyuji nakayamaさんの記事ですので読み応えがあります。 余談ですがcore teamの中でもアイコンが目立っています。かっこいい。 https://github.com/rspec WEB+DB PRESS Vol.89 作者: 佐藤歩,泉水翔吾,村田賢太,門田芳典,多賀千夏,奥一穂,伊藤直也,鍛治匠一,中山裕司,高山温,佐藤太一,西尾泰和,中島聡,はまちや2,竹原,青木大祐,WEB+DB PRESS編集部出版社/メーカー: 技術評論社発売日: 2015/10/24メディア: 大型本この商品を含むブログを見る RSpecのベストプラクティス おすすめ spec/spec_helper.rb テストのrandom実行以外はやっていませんでし
最近の RSpec は、それまで obj.stub(hoge: value) と書けたものが、 allow(obj).to receive(:hoge).and_return value と書かないといけなくなったりとか、正気の沙汰とは思えないような変更をしたりするので、何年かぶりに Test::Unit を使ってみようとリハビリ中です。 RSpec は、テストケースを入れ子にできたり、テストケースや example がクラスやメソッドではなく、文字列で自由に書くことができたりしたのが良かったのですが、最近の Test::Unit ではそれもできるようになっています。 [ruby-list:48926] [ANN] test-unit 2.5.2 このリリースはとみたさんに使ってもらえるように改良したリリー スです。新しく追加した--locationはRSpecの--line_number
Mechanize::File と Mechanize::Page クローラー作ったりしてるんですが、RSpecでテストする時に before(:each) do @agent = Mechanize.new stub_request(:get, EXAMPLE_URL). to_return(:status => 200, :body => EXAMPLE_BODY, :headers => {}) @agent.get(EXAMPLE_URL) end とかしてたんですが、何故かundefined method 'links' for #<Mechanize::File:...とか言われてしまった訳です。 調べてみたところ、Mechanizeは読み込むコンテンツの種類が分からなかった場合はMechanize::PageではなくMechanize::Fileとして読み込むため、@agen
CLR/H 代表のなおきさん (@naoki0311) のご好意で、CLR/H #58 で RSpec について喋る機会を頂きまして、昨日喋ってきました。内容は、先々週のRuby勉強会@札幌-17で喋った内容に+αしたものです。 会場はMicrosoft 北海道支店のセミナールームでした。とてもキレイで広いスペースでした。Ruby 札幌の勉強会でも使わせて頂きたいくらいの良い会議室でした。会場を無料で提供して頂いたそうで、Microsoft さんには Rubyist として本当に頭が上がりません。ありがとうございます。 また、なおきさん経由で、山田祥寛さんの『Ruby on Rails 3 アプリケーションプログラミング』を献本して頂きました。こちらの書評は、近いうちに、このブログに載せます。私はまだ Rails 3 を本格的に使ったことが無いので、とても嬉しい贈り物でした。ありがとうござ
『るびま』は、Ruby に関する技術記事はもちろんのこと、Rubyist へのインタビューやエッセイ、その他をお届けするウェブ雑誌です。 Rubyist Magazine について 『Rubyist Magazine』、略して『るびま』は、日本 Ruby の会の有志による Rubyist の Rubyist による、Rubyist とそうでない人のためのウェブ雑誌です。 最新号 Rubyist Magazine 0058 号 バックナンバー Rubyist Magazine 0058 号 RubyKaigi 2018 直前特集号 Rubyist Magazine 0057 号 RubyKaigi 2017 直前特集号 Rubyist Magazine 0056 号 Rubyist Magazine 0055 号 Rubyist Magazine 0054 号 東京 Ruby 会議 11 直
みなさま、いかがお過ごしでしょうか。以前人のことをオサーンオサーン云いまくっていたけどその当時のオサーン年齢のもうすぐ三十路になります secondlife ですこんばんわ。言葉のしっぺ返しが痛い今日この頃です。 さて、若かりし頃には合わなかったけど今使ってみるとしっくり来る物もありますね。その一つが AutoTest(ZenTest) です。ファイルが更新したらこける / SyntaxError になると解っていてもテストが走りFFF、自分のテストサイクルでテストが実行できないのが我慢できませんでしたが、久しぶりに使ってみるとそんなのは気にならず、いちいちテスト実行しなくてよくなってとても気持ちがよい感じです。 しかしながら ZenTest に含まれる AutoTest はレールが敷かれているテスト環境では利用しやすいけど、ちょっと道を踏み外すと結構テストを実行するのがめんどくさいです。
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
Download: source codeProject Files in Zip (119 KB)mp4Full Size H.264 Video (33.3 MB)m4vSmaller H.264 Video (21.1 MB)webmFull Size VP8 Video (56.9 MB)ogvFull Size Theora Video (47 MB) Resources RSpec RSpec Documentation RSpec TextMate Bundle Full Episode Source Code Note: Unfortunately there are a couple problems with this episode. Special thanks to David Chelimsky for pointing them out. Since RSpe
Chapter 17 Extending RSpec その2の続き。 17.4 Macros 下記のコードを describe Widget do it "requires a name" do widget = Widget.new widget.valid? widget.should have(1).error_on(:name) end end カスタムマッチャを使って極限まで省略すると下記のような感じに出来る。(shouldのレシーバを省略すると、describeのオブジェクトをnewしたものが補完される。) describe Widget do it { should require_attribute(:name) } end これをmacroを使うともっとよくできる。macroはrspecの代替プラグインshouldaから来ている。 describe Widget do i
このウェブサイトは販売用です! twiwt.org は、あなたがお探しの情報の全ての最新かつ最適なソースです。一般トピックからここから検索できる内容は、twiwt.orgが全てとなります。あなたがお探しの内容が見つかることを願っています!
Rspec is a great tool in the behavior driven design process of writing human readable specifications that direct and validate the development of your application. We’ve found the following practices helpful in writing elegant and maintainable specifications. First #describe what you are doing … Begin by using a #describe for each of the methods you plan on defining, passing the method’s name as th
和田 卓人(@t_wada) 作『RSpec の入門とその一歩先へ、第3イテレーション』はクリエイティブ・コモンズ 表示 - 継承 4.0 国際 ライセンスで提供されています。 大きく時間が開いてしまいました(すみません…)、RSpec 入門の第三イテレーションです。 (第3回 coffee.rb の開催に合わせたライブ更新で書かれましたので、まだ詳細の説明は途中のところもあります。) 第1イテレーション 第2イテレーション 前回終了時点のコードと実行結果 この「RSpec 入門とその一歩先へ」シリーズでは、メッセージフィルタを RSpec を使って開発することで、 RSpec の機能と TDD を同時に学ぶことを狙いとしています。 前回終了時点のコードと実行結果をまず記します。 message_filter.rb class MessageFilter def initialize(*w
Talk given by Joseph Wilk at Scotland on Rails 2009. Examines how Cucumber and Rspec fit together in the testing workflow, how and why Cucumber is useful and how it works. Walks through a simple example based on renting DVDs showing how to use Cucumber and some of the best practices. Looks at how Webrat can drive Selenium to in-turn drive Cucumber features through the browser.Read less
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く