testing with specs, capybara from railstutorial chapter 3 does not work (have_selector('title', :text => ' | Home'))

后端 未结 6 1465
日久生厌
日久生厌 2021-02-20 14:47

im working on ruby.railstutorial.org/ruby-on-rails-tutorial-book. Im using rails 3.2.7, spork, rspec, capybara, launchy and some guards :)

i have a really weird problem

6条回答
  •  离开以前
    2021-02-20 15:20

    I just checked your project on Github, and it seems that you are using the edge version of capybara:

    Gemfile

    gem 'capybara', :git => 'git://github.com/jnicklas/capybara.git'
    

    Gemfile.lock

    GIT
      remote: git://github.com/jnicklas/capybara.git
      revision: e561d249555195cdd0e9251246fc75aae876f833
      specs:
          capybara (2.0.0.beta2)
          mime-types (>= 1.16)
          nokogiri (>= 1.3.3)
          rack (>= 1.0.0)
          rack-test (>= 0.5.4)
          selenium-webdriver (~> 2.0)
          xpath (~> 1.0.0.beta1)
    

    If nothing else, I would dare say this is the cause of your problem. (And sure enough, my reference project is broken all over after updating capybara to use the edge version)

    So, unless you are keen to help with the beta testing of Capybara 2, you would do well to stick to the 1.1.2 version as listed here.

提交回复
热议问题