In the view spec results using Capybara.string alternative rendered (Capybara version 0.4.12)

2011-05-10  来源:本站原创  分类:Ruby  人气:121 

Question tags: undefined method `has_selector? 'For # <String:0x1034ecfb0>

Version:
Capybara (0.4.12)
RSpec-Rails (2.5.0)

Added: just tried the latest version of the RSpec-Rails2.6.0.rc6 and Capybara1.0.0.beta1, have to solve this problem ... ...

After some google:
https: / / github.com/rspec/rspec-rails/issues/213
https: / / github.com/jnicklas/capybara/issues/139
https: / / github.com/rspec/rspec-rails/issues/302

Last:

In spec_helper.rb add the following code:

if defined?(Capybara) && !defined?(Webrat)
  module ActionView::TestCase::Behavior
    alias old_rendered rendered

    def rendered
      Capybara.string old_rendered
    end
  end
end
相关文章
  • In the view spec results using Capybara.string alternative rendered (Capybara version 0.4.12) 2011-05-10

    Question tags: undefined method `has_selector? 'For # <String:0x1034ecfb0> Version: Capybara (0.4.12) RSpec-Rails (2.5.0) Added: just tried the latest version of the RSpec-Rails2.6.0.rc6 and Capybara1.0.0.beta1, have to solve this problem ... ... Af

  • Linux kernel module compiled. Loading & unloading and view the results 2011-03-30

    Here, I use only the most simple code HelloWorld # Include <linux/init.h> # Include <linux/module.h> MODULE_LICENSE ("Dual BSD / GPL"); static int hello_init (void) { printk (KERN_EMERG "Hello World enter! \ n"); return 0;

  • beautify and optimize listview 2010-11-17

    In android development, listview is a commonly used component that displays data in the form of a list. List shows the required three elements: 1, listview to display the detailed list view 2, XXAdapter adapter specific data used to map to the listvi

  • Oracle data types and storage (b) the value type 2010-08-26

    The second part of the value type § 2.1 number Oralce Number type is the type of value, the stored value of precision can reach 38. Number is a variable length type, a length of 0-22 bytes. Range: 10e-130 - 10e 126 (not included) Number (p, s) P and

  • Android动态刷新listview中的数据 2012-08-24

    代码如下: 1.TestAdapter package com.TestAdapter; import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; import android.app.Activity; import android.content.Context; import android.os.Bundle; import android.view

  • Production of RPM packages 2010-10-28

    Production of the most critical is the RPM package to write SPEC file. Install a program is to write some configuration item, then source code or binary code into the installation directory. If the procedure is to use GCC, RPM is indeed very convenie

  • How to flash decimal places reserved 2010-11-04

    Easier to make money at home no built-in flash in the preservation method of decimal places, but when you want, such as 3.14159265354. so when the data to retain only how to do a double-digit, the following function can solve this problem. / ** * Dat

  • 10.11.2 IO structure of the value of reading 2010-12-23

    Using standard input loop to solve a practical problem is assumed to deal with a temperature reading documents, the structure is: {Year 1990} {Year 1991 {month jun}} {Year 1992 {month jan (1 0 61.5)} {month feb (1 1 64) (2 2 65.2)}} {Year 2000 {Month

  • ubuntu installation input (similar to sogo) [Z] 2011-05-09

    About Pinyin Input The Pinyin input method is based on the scim-python, using python language development of smart pinyin input method. Input Method Guide to get started How to install? Fedora 8 system With the root user at the console, run the follo

  • 求解开jscript.encode代码的asp函数 2013-12-10

    javascript函数已经有了,有没有Asp的函数??? 或者有没有高手可以把下面的写成asp的 ,万分感谢~!! <SCRIPT LANGUAGE="JavaScript"> <!-- function toEncode(s,l) {enc=new ActiveXObject("Scripting.Encoder"); return enc.EncodeScriptFile("."+l,s,0,l+"cript&q

  • fckeditor php上传文件重命名的设置 2014-12-11

    我使用的fckeditor版本是fckeditor2.6.4. fckeditor默认上传文件不没有重命名的,这样的话就很麻烦,有时上传中文的文件或者名称重复的文件就很恼火. 这里经过摸索:找到了一个重命名的方法,大家看看好不好使. 首先:我希望上传的文件根据日期来组织文件夹 请修改editor\editor\filemanager\connectors\php文件夹下的:config.php文件 找到如下的内容: // Path to user files relative to the do

  • 大数据系列11:Gora – 大数据持久化 2015-04-07

    wget http://mirrors.cnnic.cn/apache/gora/0.3/apache-gora-0.3-src.zip unzip apache-gora-0.3-src.zip cd apache-gora-0.3 mvn clean package 1.创建项目 mvn archetype:create -DgroupId=org.apdplat.demo.gora -DartifactId=gora-demo 2.增加依赖 vi gora-demo/pom.xml 在<d

  • Optimization into a worry: String.split caused by "memory leak" 2010-03-29

    Has been praised Sun rigorous and elegant treatment technologies (bless Sun). Sun JDK source code in the Java libraries, even the notes are clear and regulatory norms Fan, javadoc comment use was also a meticulous reading comfortably familiar. Thus,

  • String and StringBuffer Xiangjie 2008-11-25

    String and StringBuffer Xiangjie (transferred) 2007-10-09 09:32 doubts about search-related information was thus found that a good text, reproduced below for reference only: String creation String s = "hello"; JVM first, according to the content

  • String object understanding in progress 2008-06-12

    In-depth JAVA virtual machine "is so described in the book: JVM run-time data area of memory model consists of five parts: [1] [2] methods that heap [3] JAVA stack [4] [5] PC register native method stacks For String s = "haha", its virtual

  • Oracle frequently used characters and string handling class functions 2010-03-15

    ##################################### # Commonly used class of character and string handling functions ##################################### # LOWER function function: to convert a string into lowercase letters example: select firstname, lastname fro

  • Oracle common type of characters and string handling functions 2010-03-15

    ##################################### # Commonly used class of character and string handling functions ##################################### # LOWER function function: to convert a string into lowercase letters example: select firstname, lastname fro

  • FLex view model and view transformation 2010-05-10

    3.2 View model and view transformation 3.2.1 View Mode Flex visual components to diversify and strengthen the interaction with the user, provide a view mode support. HTML page through frame design, labels, etc. to carry out programming interface, a u

  • android list view component ListView Xiangjie 2010-09-03

    ListView android development in a more common component of the form it displayed a list of specific content, and adaptive to the length of the data shows. Find time to make use of the ListView do organize, and write a small example, as shown below. L

  • shELL in the string processing (transfer) 2010-09-21

    Shell's string handling Shell's string handling 1 be the length of % X = "abcd" # Method 1 % Expr length $ x 4 # Method 2 % Echo $ (# x) 4 # Method 3 % Expr "$ x": ".*" 4 # Expr Help # STRING: REGEXP anchored pattern match of