並び順

ブックマーク数

期間指定

  • から
  • まで

81 - 120 件 / 358件

新着順 人気順

Capybaraの検索結果81 - 120 件 / 358件

  • Railsアプリをインテグレションテストするために、Capybaraをtest-unitといっしょに使う - soutaroブログ

    「Capybara test unit」とか検索すると、なんか正解が出てこない気がするので、メモ。test-unit-capybaraとかあるけど、なにをやってくれるのか良くわからん。 結局のところ、必要なのは次の3つ。 Gemfileに書く capybara/railsをrequireする IntegrationTestの中でCapybaraをincludeする そもそもCapybaraってなに? Cucumberと関係あるの? 私がCapybaraについて聞いたのはCucumberに関する文脈だったせいで、ちょっと混乱していたのですが、この二つは特に関係ありません。 Capybaraというのは インテグレーションテストしやすくするためのフレームワーク で、 visit "/" click "button" みたいなAPIを提供してくれて、ブラウザの動作をテストでシミュレーションしやすく

      Railsアプリをインテグレションテストするために、Capybaraをtest-unitといっしょに使う - soutaroブログ
    • Capybara (and Selenium) with RSpec & Rails 3: quick tutorial

      Here is how to set up Capybara with RSpec 2 and Ruby on Rails 3. Further down I’ll also show you how to drive Selenium through Capybara. The only assumption is that you have a bare-bones Rails 3 application set up. First, add Capybara to your Gemfile:

      • Selenium WebDriver(リモートサーバー)+Capybaraを試してみた。 - kitak blog

        こんにちは。お金がなくて困っています。きたけーです。 今日、朝、Selenium WebDriver(リモートサーバー)とCapybaraを試してみたのでそのまとめ。 Selenium WebDriverなんぞそれ?っていう人は、このスライドをみると便利さが分かるのではなかろうか。 ようするにテストを走らせたいブラウザのあるマシンでリモートサーバーを立てておいて、クライアントからテストを投げることができる。複数台用意すれば、複数の環境でほぼ同時にテストを走らせることができる。 以前、JSのテストを走らせるためのVMを構築していたときにWebkitでしかテストできないヨ! IEでテストできないヨ!とかほざいていましたが、IEの動くWindowsマシンを用意してリモートサーバーを立てれば解決ですね。 それを用意するのが面倒なんだよ...という方のために近いうちBrowserStackを試してみ

          Selenium WebDriver(リモートサーバー)+Capybaraを試してみた。 - kitak blog
        • Running feature specs with Capybara and Chrome headless | Getaround Tech

          Running feature specs with Capybara and Chrome headless July 05, 2017 – Tim Petricola – 2-minute read This article was written before Drivy was acquired by Getaround, and became Getaround EU. Some references to Drivy may therefore remain in the post At Drivy, we’ve been using Capybara and PhantomJS to run our feature specs for years. Even with its issues, PhantomJS is a great way to interact with

            Running feature specs with Capybara and Chrome headless | Getaround Tech
          • #257 Request Specs and Capybara - RailsCasts

            Request specs in RSpec are a great way to ensure the entire application stack is working properly. Here I also show how to use capybara with integrated JavaScript testing using Selenium.

            • Module: Capybara::Node::Actions — Documentation for jnicklas/capybara (master)

              Find a descendant file field on the page and attach a file given its path.

              • Capybara+Seleniumのユニットテストで使うブラウザを変更する方法 - Haskell雑記帳

                昨日 の続きです。 最新版(まだ開発版)のCapybaraを使うと簡単にSelenium経由でFirefoxを使ったユニットテストができると書きましたが、その仕組みが謎だったので調べました。 Seleniumで使うブラウザをFirefoxからChromeに変える spec/spec_helper.rb に以下の設定を書きます。 require 'capybara/rspec' Capybara.register_driver :selenium_chrome do |app| Capybara::Driver::Selenium.new(app, :browser => :chrome) end Capybara.javascript_driver = :selenium_chrome Configuring and adding driversのところに書いてあります。 Sporkを使う

                  Capybara+Seleniumのユニットテストで使うブラウザを変更する方法 - Haskell雑記帳
                • Capybara + Rspecでvisitがundefined methodと言われたときの対策 - Qiita

                  NoMethodError: undefined method `visit' for #<RSpec::Core::ExampleGroup::Nested_7:0x007fff279d8158> と、Capybaraのメソッドを認識しないという事件がありました。 こう言われたときは、ここに書いてあるとおり、 https://github.com/rspec/rspec-rails/issues/360 spec_helper.rbのRSpec.configureの中にconfig.include Capybara::DSLを書くとうまく動きます。 以下がサンプルです。 require 'rubygems' require 'spork' #uncomment the following line to use spork with the debugger #require 'spor

                    Capybara + Rspecでvisitがundefined methodと言われたときの対策 - Qiita
                  • Leave end-to-end testing to Capybara

                    Agile Japan 2016 長崎サテライト with NaITE (http://nagasaki-it-engineers.connpass.com/event/32873)

                      Leave end-to-end testing to Capybara
                    • Cucumber + Capybara – What we need for rails integration test | DIG RUBY

                      h2. What's Capybara bq. Capybara is a webrat alternative which aims to support all browser simulators. As you know, webrat can not run javascript onWhat’s Capybara Capybara is a webrat alternative which aims to support all browser simulators. As you know, webrat can not run javascript on the webpage. In order to test javascript and AJAX based website we need install Selenium-client and learn extra

                      • 表参道.rb #10 で PHP + Capybara ネタの LT をしてきた - kakakakakku blog

                        久し振りに「表参道.rb」に参加してきた. 会場の東京糸井重里事務所には初潜入だったけど,宇宙鳥の乱入があったり,豪華な手料理の提供があったり,とにかく最高だった. omotesandorb.connpass.com LT した 今回は「PHP + Capybara を試してみた」というタイトルで LT した. 去年10月に異動してから Ruby を書く機会が完全に無くなっているんだけど,先月 Capybara を導入する機会があって,約2週間で取り組んだ話をまとめた.内容的には基本的なレベルだけど,PHP アプリケーションでも Capybara で E2E テストが書けるんだ!っていう事例をうまく話せたかなと思う. 発表練習のときには言うのを控えてた「ツライ」なんだけど,LT 中は無意識に「ツライツライ」と連発してしまって,ハッシュタグを見たら「ツライ祭」になっててワロタwww LT の

                          表参道.rb #10 で PHP + Capybara ネタの LT をしてきた - kakakakakku blog
                        • Capybara で within した場所や find したノードに枠を付けてくれるやつ作った - Thanks Driven Life

                          gongo/maizebox · GitHub まだまだやる事はあるのですが、とりあえず動いたので公開。 What 件名の通り。結果から言うと下図のようにしてくれるやつです。 Why PhantomJSでページに注釈を付けてスクリーンショット撮るやつ - hitode909の日記 という素晴しい記事とツールを発見したのですが 仕事では Capybara 使っている (driver は selenium-webdriver or poltergeist) ので、Capybara から使えると便利だなと思ったので作ってみました。 How (for User) examples にもあるやつです。 visit 'http://www.apple.com/jp/' within(:css, 'div.text') do page.attention_here page.attention_to(f

                            Capybara で within した場所や find したノードに枠を付けてくれるやつ作った - Thanks Driven Life
                          • End-to-End Testing with RSpec Integration Tests and Capybara

                            Stability can become an issue as web applications evolve and grow – integration tests provide a great way to perform end-to-end tests that validate the application is performing as expected. Integration test with RSpec and Capybara When writing integration tests, try to model the test around an actor (user of the system) and the action they are performing. # spec/features/visitor_signs_up_spec.rb

                              End-to-End Testing with RSpec Integration Tests and Capybara
                            • GitHub - DavyJonesLocker/capybara-email: Test your ActionMailer and Mailer messages with Capybara

                              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

                                GitHub - DavyJonesLocker/capybara-email: Test your ActionMailer and Mailer messages with Capybara
                              • rspecとcapybaraでスクリーンショットを保存する | KonifarPod

                                rspecとcapybaraを使って画面のスクリーンショットを保存してみました。これでレイアウト崩れや多言語対応漏れなどを簡単にチェックできるようになるはず。 capybaraとrspecについては、こちらに詳しくまとまっていますので、今回はスクリーンショットを取るための設定、それまでに出たエラーと対処方法を記載しておこうと思います。(rspecはすでに導入されている前提です) 1.gemの追加 Gemfile に以下を追加して bundle install します。 gem 'capybara' gem 'capybara-webkit' gem 'selenium-webdriver' 2.spec_helper に設定を追加 require 'capybara/rspec' ... RSpec.configure do |config| ... ActionController::B

                                  rspecとcapybaraでスクリーンショットを保存する | KonifarPod
                                • capybara 2.1 を学ぶ - おもしろwebサービス開発日記

                                  Introducing Capybara 2.1 — Elabs を読んでのメモです。 capybara 2.1 を 2.0 と同じ挙動にする capybara 2.1 を 2.0 と同じ挙動にするには下記のように設定する Capybara.configure do |config| config.match = :one config.exact_options = true config.ignore_hidden_elements = true config.visible_text_only = true end capybara 1.x から 2.1 にアップグレードする 1.x から 2 系に上げると、互換性がない変更があって大変だけど、下記の設定をしておけばあとは簡単(らしい)。 Capybara.configure do |config| config.match = :p

                                    capybara 2.1 を学ぶ - おもしろwebサービス開発日記
                                  • RSpec/Capybara -- はじめの一歩

                                    連載第2回目は、プログラマーの古き良き伝統「Hello World」です。RailsアプリケーションのTopページに「Hello World!」というコンテンツを持つ p 要素が存在するかどうかをRSpecとCapybaraでテストします。 本連載のメインの読者としてはRubyとRailsを学習中の方を想定しています。したがって、RubyとRailsはインストール済みであるという前提で話を始めます。Ruby のバージョンは2.0.0で、Railsのバージョンは4.0.0です。オブジェクト、クラス、モジュール、メソッド、インスタンス変数といったRubyの基本的な概念、モデル、ビュー、コントローラ、ルーティングといったRailsの基本的な概念については説明しません。なお、データベース管理システムとしてはMySQLを使用します。おそらく、SQlite3やPostgreSQLやOracleでもうま

                                      RSpec/Capybara -- はじめの一歩
                                    • Capybaraでクリックできない場合の対処法 - tail -f /dev/null

                                      1年以上経過しており情報が古い可能性があります 環境 MacOSX 10.11 RSpec 3.3.2 Capybara 2.5.0 事前に見るべきリファレンス capybara-readme-ja 事象 テストは通っているが、どうもボタンを押せていない。ということが少なからずある。 例えばFacebookのログインページのボタンである。 % rspec xxtest.rb Run options: include {:focus=>true} All examples were filtered out; ignoring {:focus=>true} Randomized with seed 2062 アカウント登録フロー Facebookでのログイン Top 1 slowest examples (30.18 seconds, 100.0% of total time): アカウント

                                        Capybaraでクリックできない場合の対処法 - tail -f /dev/null
                                      • Capybara Reference

                                        Update: Capybara 0.4 is out. There have been some changes to how some of these methods work (especially XPath selectors). Full details here ...

                                        • Migrating from Capybara-Webkit to Poltergeist-PhantomJs

                                          MotivationToday I migrated a medium size test suite from capybara-webkit to Poltergeist with PhantomJS. I had two main motivations for switching: PhantomJS is more sensitive to avoiding false positives. For example, in the past, one could click on non-visible DOM elements with capybara-webkit. While this may not currently be true with the latest Capybara, I've had good luck with PhantomJS in the p

                                          • Why wait_until was removed from Capybara

                                            The release of Capybara 2.0.0 removed the wait_until method from the API. This seems to have frustrated a few people, so let me explain why this decision was reached and what your options are for the future. wait_until was removed for several reasons: It simply isn’t necessary for most applications and test suites. Its existence confuses people into thinking that it is necessary, when in fact it i

                                              Why wait_until was removed from Capybara
                                            • Caplin Rous – a famous Capybara (71 pics)

                                              We care about our visitors and respect personal information which you share with us. It is important to us that you are aware of data we are collecting about you and how we are doing it. Due to this we are updating our Privacy Policy and Cookie Policy. These updates will come into effect starting from May 25, 2018. By using the site izismile.com after May 25, 2018 you are acknowledging that you ag

                                                Caplin Rous – a famous Capybara (71 pics)
                                              • Cucumber + CapybaraでUserAgentを設定してテストを行う - tech-kazuhisa's blog

                                                jpmobileで作成されたRailsプロジェクトをテストする必要があったので調べてみました。 ちょっとググると次のサイトが出てきます。 Ruby 1.9 + Rails3 + jpmobileで構築したサイトをcucumberでテストするためのTips Capybara::Driver::RackTestに細工をしてUserAgentを偽装する方法です。 ただし、手元にインストールされているCapybara1.1.2はCapybara::Driver::RackTestは無くなっており代わりにCapybara::RackTest::Driverが実装されていて、上記の偽装を行うことができません。 他の手を探してみたところ次の記事が見つかりました。 Creating a custom Capybara driver この方法は新しいCapybaraのDriverを設定してしまう方法です。

                                                  Cucumber + CapybaraでUserAgentを設定してテストを行う - tech-kazuhisa's blog
                                                • capybara-webkit と font-awesome を仲良くさせる方法 - おもしろwebサービス開発日記

                                                  皆さん、font-awesome は使っていますか?font-awesomeは、twitter bootstrap が提供しているアイコンを、フォントとして使えるようにしてくれるライブラリです。フォントなので、拡大しても画質が荒くならないですし、色を変えることも簡単にできます。べんり! ただ、一つだけ難点があります。font-awesome を使っていると capybara-webkit でのテストがこけるのです。理由は、capybara-webkit(というかcapybara-webkitが依存しているqt) が font-awesome などの外部フォントに対応していないためです。というわけで下記のようにして対処しました。 前提 gem 'font-awesome-sass-rails'を使っています。素の font-awesome を使っている人は別のやり方でないとダメだと思います。

                                                  • Capybaraでjavascriptのajaxなテストにuntilを使うと便利だった

                                                    Capybaraのテストでajaxな処理の部分のテストを wait などで適当な秒数だけ遅延させていたけど、 untilというのを使うと便利ということを教えていただいた。 たとえば、ajax処理後に特定のhtml要素が表示されることを評価するなら という感じでhelperを作成しておけば のように使用できる。 これまではajaxのレスポンスを** wait 5 などで遅延していたけど、until**を使うと条件がtrueになるまで評価を行ってくれるらしい。 無駄な待ち時間を短縮できるので便利でした。

                                                    • サッカー日本代表メンバー23人を信じる ブラジルW杯での初戦の先発を勝手に予想 - グリーン カピバラ Green Capybara

                                                      とうとう関東地方でも梅雨入りしました。 少し涼しいので、先日の夏を先取りってな感じの気候に比べたら過ごしやすいですね。 しかしながらやはり雨だと色々とやりにくいですね。 先日、好き勝手なブラジルW杯の優勝予想を書きました。 全くもって身勝手な希望的観測入りまくりのブラジルW杯の優勝予想 - グリーン カピバラ Green Capybara イングランドのプレミアリーグでチェルシーを率いているジョゼ・モウリーニョ監督がブラジルW杯の予想をしていましたね。 最後は真剣ではなかったようですが、予想なんてそんなものでしょうね(笑) モウリーニョ監督がW杯予想…日本はGL敗退、優勝はイングランド(SOCCER KING) - ブラジルワールドカップ特集 - スポーツナビ キャプテン長谷部選手の状態が気がかりです 前試合欠場の長谷部、状態上向きも次戦へ無理せず「一番はW杯」 (SOCCER KING)

                                                        サッカー日本代表メンバー23人を信じる ブラジルW杯での初戦の先発を勝手に予想 - グリーン カピバラ Green Capybara
                                                      • Turnip + Capybara のテストレポートにスクリーンショットを載せる gnawrnip 更新しました - Thanks Driven Life

                                                        前回 Gnawrnip - Add-on for TurnipFormatter with Capybara - Thanks Driven Life の続きです。 gongo/gnawrnip · GitHub これまではエラーが起きた瞬間の画像だけを載せていたのですが やっぱりその過程も見たいよね→動画GIFみたいにすればいいのでは?ってことで機能追加。 この為に Capybara の稼働状況を animation gif として保存する - Thanks Driven Life とか試していました。 gnawrnip の設定項目 今回の機能追加に併せて設定機能も持たせました。詳しくは README を見ていただくとして、軽く紹介 Gnawrnip.configure do |c| c.photographer_driver = :js # or :rmagick c.frame_in

                                                          Turnip + Capybara のテストレポートにスクリーンショットを載せる gnawrnip 更新しました - Thanks Driven Life
                                                        • Rails + Turnip + Capybara + poltergeistでBDDテスト - Qiita

                                                          ちょっとテストコードを見直す機会があったのでこの機会にTurnipを入れてGherkinで記述する事でより、第三者が見やすいようにしてみた。 その際に色々調べたのでメモ。 1 Turnipってなんぞや? 簡単にいうと、 ・大枠はCucumberと同じ ・Cucumberの際に一番ネックとなっていた正規表現の部分をよりプレースホルダーを使って簡単に記述 ・Capybaraの開発者が作ったものなので、Capybaraとの相性は申し分なし 2 Gherkin書式ってなんぞや? ・ Cucumber により拡張された書式。Business Readable DSL(≒仕様記述のDSL)といわれている ・システムの振る舞いを記述するための自然言語に近い書式 (下記の実際のコードを見てもらえれば理解できるかと思います) ※ちなみに...有名な他のDSLとしは、 Rspec :テストのDSL Chef

                                                            Rails + Turnip + Capybara + poltergeistでBDDテスト - Qiita
                                                          • Rails TDD/BDD開発向けテスト一式(ユニット/インテグレーションテスト、テスト自動化、静的解析) Rspec + Capybara + PhantomJS + Poltergeist + Turnip + Jasmine + FactoryGirl + Guard + Rubocop + Spring - Shred IT!!!!

                                                            概要 Rails4.2 で新規プロジェクトを立ち上げることになったらテストをどうしようか。 現時点で考えうる全部入りを試してみようと思う。 導入する gem やライブラリは下記。 Rspec Ruby向けテストフレームワーク Capybara WEBアプリケーションのテストを補助するライブラリ PhantomJS ヘッドレスブラウザ Poltergeist Capybara を PhantomJS で動作させるためのドライバ Turnip Rspec を Gherkin 書式に対応させる Jasmine Javascript向けテストフレームワーク FactoryGirl テストデータを柔軟に生成 Guard ファイル変更を監視して任意のコマンドを実行 Rubocop 静的解析ツール(コーディング規約チェック) Spring アプリケーションプリローダー 何ができるかというと、 単体テスト

                                                              Rails TDD/BDD開発向けテスト一式(ユニット/インテグレーションテスト、テスト自動化、静的解析) Rspec + Capybara + PhantomJS + Poltergeist + Turnip + Jasmine + FactoryGirl + Guard + Rubocop + Spring - Shred IT!!!!
                                                            • RSpec + Capybara でラジオボタン/セレクト/チェックボックスのフォーム要素をテスト

                                                              — 環境 — rails-4.0.1 rspec-rails-2.14.0 capybara-2.2.0 User モデルでの form_for の中で Rails ヘルパーでフォーム要素を作成し、出力される HTML を併記しています。また、それに対する RSpec + Capybara でのテストの書き方。 radio button(ラジオボタン) <%= f.radio_button :gender, 'male' %> 男性 <%= f.radio_button :gender, 'female' %> 女性 ↓ <input id="user_gender_male" name="user[gender]" type="radio" value="male" /> 男性 <input id="user_gender_female" name="user[gender]" type

                                                                RSpec + Capybara でラジオボタン/セレクト/チェックボックスのフォーム要素をテスト
                                                              • End to End Tests on CircleCI with Docker - Rails, Capybara, Selenium

                                                                The web development world is changing fast. I feel that we are moving towards splitting monolith web applications in two, by extracting backend part into an API. This solution, even though it has many pros, it brings in some difficulties as well. One of which are end to end tests. It may be really tricky to execute those tests in a proper way, especially when we don't have that much of a control o

                                                                • CapybaraとSeleniumを使ってPageObjectデザインパターンによる画面変更に強いUIテストのサンプル - Qiita

                                                                  概要 画面操作とテストシナリオが疎結合にできるPageObjectデザインパターンを試したかったので、検索ワードにヒットする商品を自動購入するAmazonの自動購入処理を書きました。 参考ページをCapybaraに移植したものになります。 PageObjectデザインパターンとは 公式によるとPageObjectデザインパターンとは、以下だそうです。 ・The public methods represent the services that the page offers(publicメソッドは、ページが提供するサービスを表す) ・Try not to expose the the internals of the page (ページの内部を公開しないこと) ・Generally don’t make assertions (原則としてassertionを行わないこと) ・Method

                                                                    CapybaraとSeleniumを使ってPageObjectデザインパターンによる画面変更に強いUIテストのサンプル - Qiita
                                                                  • How to `bundle' install or update with capybara include nokogiri - Qiita

                                                                    How to `bundle' install or update with capybara include nokogiriRailsMacOSX Using mini_portile 0.6.1 Gem::Ext::BuildError: ERROR: Failed to build gem native extension. /Users/maangie/.rvm/rubies/ruby-2.1.4/bin/ruby -r ./siteconf20141108-54032-maimfn.rb extconf.rb checking if the C compiler accepts ... yes checking if the C compiler accepts -Wno-error=unused-command-line-argument-hard-error-in-futu

                                                                      How to `bundle' install or update with capybara include nokogiri - Qiita
                                                                    • Capybara RSpecでのマッチャ、セレクタ 「こんなときどうするの」その1 - Qiita

                                                                      TDDやってますか?必須と言われつつも、なかなか習慣にするまでは時間かかりますよね。 本質的に 入力と評価したいものに集中できるよう、覚える必要があるマッチャとセレクタは、とっとと覚えられるようにしたいですね。 HTML要素の属性を評価したい xpathでの記法とcssでの記法両方が使えますが、おそらく皆さんがなじみ深いのは(jQueryセレクタでよく使う) cssでの記法だと思いますので、そちらに集中して掲載します。 自分が楽だと思った方法 とりあえず、findに入れて、テキストが返ってくる状態にしてから、シンプルなマッチャで評価する。 have_css とか have_xpath とかで評価したいものを表現するよりも、書くのが早い気がする。

                                                                        Capybara RSpecでのマッチャ、セレクタ 「こんなときどうするの」その1 - Qiita
                                                                      • Rails Engine Testing with RSpec, Capybara, and FactoryGirl | Viget

                                                                        UPDATED: I've updated the instructions based on feedback in the comments suggesting the use of the --dummy-path=spec/dummy --skip-test-unit options on the rails plugin new command. Recently, we've been doing a lot more with Rails engines. We've developed a few engines that we've released publicly, and even more that we use privately on applications. We've found it's a good way to organize and shar

                                                                          Rails Engine Testing with RSpec, Capybara, and FactoryGirl | Viget
                                                                        • Simple tricks to clean up your Capybara tests

                                                                          I’d like to share with you a few simple tricks we use all the time at Varvet to clean up our Capybara tests. Often we want to find a specific area of the page, and perform some action in that area. With the imminent release of Capybara 2.0, you will probably find yourselves doing this even more, since you will sometimes have to be more specific about which element you want to interact with, since

                                                                            Simple tricks to clean up your Capybara tests
                                                                          • The Basics of Capybara and Improving Your Tests — SitePoint

                                                                            August 18, 2014The Basics of Capybara and Improving Your Tests Capybara is a web-based automation framework used for creating functional tests that simulate how users would interact with your application. Today, there are many alternatives for web-based automation tools, such as Selenium, Watir, Capybara, etc. All of these tools have the same purpose, but there are slight differences that make eac

                                                                              The Basics of Capybara and Improving Your Tests — SitePoint
                                                                            • minitest と capybara で rails3 の integration テストを書く - おもしろwebサービス開発日記

                                                                              ハマったのでメモ。素の minitest と capybara でテストを書く方法もありますが、とりあえず試してみるなら minitest-rails と minitest-rails-capybara を使うのが一番早いです。 Gemfile に下記のように書いて bundle install group :development, :test do gem "minitest-rails" end group :test do gem "minitest-rails-capybara" end 下記コマンドで test/minitest_helper.rb を生成します。 rails generate mini_test:install さらに、test/minitest_helper.rb の require "minitest/rails/capybara" の行をコメントアウトし

                                                                                minitest と capybara で rails3 の integration テストを書く - おもしろwebサービス開発日記
                                                                              • RSpec2 + Capybara-Webkitでの注意点 - === SANDmark 19106 === beginning stress test

                                                                                昨日の記事 id:sandmark:20120324 に不備があったので補足です。 参考サイト: kinopyo blog - Learning through Writing RSpec2はテストをそれぞれ実行するときデータベースをクリアしてくれますが、 capybara-webkit を使ったとき(it "hoge", :js => trueのとき)は データが渡されない+クリアされない=テストが動かないので、何とかしてやる必要があります。 gem 'database_cleaner' を使ってRSpec2に設定をしてやります。 Gemfile: group :test, :development do gem "database_cleaner" end spec/spec_helper.rb:(2012-04-03: 間違いです。後述。) RSpec.configure do |c

                                                                                  RSpec2 + Capybara-Webkitでの注意点 - === SANDmark 19106 === beginning stress test
                                                                                • Scraping data with Capybara - Jumpstart Lab Curriculum

                                                                                  When you would like to retrieve data from a website, you can use an API: an Application Programming Interface. This is a url that emits the data in a paresable format like JSON or XML. When the program doesn’t have an API, however, how do you get it? Parsing HTML Yourself Parsing HTML with regular expressions is a losing game. Instead, we’ll use the industry standard nokogiri. In many cases, using