undefined local variable or method ‘xxx’ for #<RSpec::Core::ExampleGroup::Nested_1::Nested_1:0xbc88d6c>错误解决方案
官方文档如下:
https://github.com/rspec/rspec-rails/blob/master/Capybara.md
Capybara 2.0
To use Capybara 2.0, you need rspec-rails-2.11.1 or greater.
Capybara::DSL is added to examples in:
- spec/features
Capybara::RSpecMatchers is added to examples in:
- spec/features
- spec/controllers
- spec/views
- spec/helpers
- spec/mailers
问题原因:Capybara2.0以后,集成测试的目录变了
解决方案为:默认生成的RSpec集成测试目录为requests目录,改为features目录即可解决问题
参考原文:https://github.com/rspec/rspec-rails/issues/360
undefined local variable or method ‘xxx’ for #<RSpec::Core::ExampleGroup::Nested_1::Nested_1:0xbc88d6c>错误解决方案的更多相关文章
- [异常]undefined method `visit' for #<RSpec::Core::ExampleGroup::Nested_1:0x16529f8 @example=nil>
在进行Rspec 编译测试: bundle exec rspec spec/requests/static_pages_spec.rb 提示错误: FF Failures: 1) Static pag ...
- 错误:Attempt to resolve method: [XXX方法] on undefined variable or class name: [XXX类]的解决(IDEA打包jar问题)
问题: 使用JMeter调用jar包的时候,报错误信息Typed variable declaration : Attempt to resolve method:[XXX方法] on undefin ...
- local variable 'xxx' referenced before assignment
这个问题很囧,在外面定义了一个变量 xxx ,然后在python的一个函数或类里面引用这个变量,并改变它的值,结果报错local variable 'xxx' referenced before as ...
- 【转】The final local variable xxx cannot be assigned, since it is defined in an enclosing type
文地址:http://blog.163.com/benben_long/blog/static/199458243201481102257544/ 本文就自己编程时候遇到的一个问题,简要描述一下,并提 ...
- python的UnboundLocalError: local variable 'xxx' referenced b
一.意思: 本地变量xxx引用前没定义. 二.错误原因 在于python没有变量的声明 , 所以它通过一个简单的规则找出变量的范围 :如果有一个函数内部的变量赋值 ,该变量被认为是本地的,所以 ...
- Python问题:UnboundLocalError: local variable 'xxx' referenced before assignment
参考链接: http://blog.csdn.net/onlyanyz/article/details/45009697 https://www.cnblogs.com/fendou-999/p/38 ...
- python: local variable 'xxx' referenced before assignment
问题发现 xxx = 23 def PrintFileName(strFileName): if xxx == 23: print strFileName xxx = 24 PrintFileName ...
- local variable 'xxx' referenced before assignment(犯过同样的错)
这个问题很囧,在外面定义了一个变量 xxx ,然后在Python的一个函数里面引用这个变量,并改变它的值,结果报错local variable 'xxx' referenced before assi ...
- dao 接口定义了一个方法,报错 The method xxx is undefined for the type xxx;
转自:https://blog.csdn.net/panshoujia/article/details/78203837 持久层(DAO层)下的一个接口 ,eclipse报了一个The method ...
随机推荐
- 真机下, 如何在File Explorer里看data下的数据?
首先手机得Root , 你如果想单个单个的看, root explorer可以设置Permission Other下的两个权限点上就ok了. 如果想看到所有的, 即子目录也可以看到, 只需要adb r ...
- 在查找预编译头时遇到意外的文件结尾。是否忘记了向源中添加“#include "StdAfx.h"”?
在查找预编译头时遇到意外的文件结尾.是否忘记了向源中添加“#include "StdAfx.h"”? 右键选择该文件.cpp格式的->属性->预编译头,→ 不使用预编译 ...
- JPA与ORM以及Hibernate
- HDU 2181 哈密顿绕行世界问题 (DFS)
哈密顿绕行世界问题 Time Limit: 3000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others) Total ...
- [改善Java代码]用枚举实现工厂方法模式更简洁
工厂方法模式(Factory Method Patter)是"创建对象的接口",让子类决定实例化哪一个类,并使一个类的实例化延迟到其子类.工厂方法模式在我们的开发工作中,经常会用到 ...
- SSH整合_struts.xml 模板
<?xml version="1.0" encoding="UTF-8" ?> <!DOCTYPE struts PUBLIC "- ...
- IOS图片的两种处理:加阴影和变灰色
#import <QuartzCore/QuartzCore.h> //图片阴影 UIImageView *img; [[img layer] setShadowOffset:CGSize ...
- Python性能测试
python -m profile xxx.py > log.txt 打开log.txt查看,搜索你所关心的方法调用耗费的时间. profile的统计结果分为ncalls.tottime.per ...
- [算法练习] UVA-10010-Where's Waldorf?
UVA Online Judge 题目10010 Where's Waldorf? Waldorf在哪? 问题描述: 给出一个m行n列的字符矩阵(),和一个单词列表,在矩阵上匹配每个单词.在矩阵上匹 ...
- Angular 全局页面切换动画 me-pageloading
最近看了Codrops的一篇文章, 里面讲到了一个页面切换的效果, 详情点击此处. 看了这个效果感觉很赞, 觉得这个效果可以用在angular的页面切换中, 所以将这个效果移植到angular中, 做 ...