恼人的RSPEC错误(Annoying RSPEC Error)

编程入门 行业动态 更新时间:2024-10-28 12:26:36
恼人的RSPEC错误(Annoying RSPEC Error)

嘿所有,我的Rspec测试失败并出现错误:

syntax error, unexpected kEND, expecting $end (SyntaxError)

我不知道为什么,我的代码如下(实际内容通过xcode侧边栏上的箭头删除):

require 'spec_helper' describe UsersController do render_views describe "GET 'show'" do ... end describe "GET 'new'" do ... end describe "POST 'create'" do ... end end

完整代码http://snipt.org/xtpm

Hey all, My Rspec test fail with the error:

syntax error, unexpected kEND, expecting $end (SyntaxError)

I don't know why, my code is as follows (actual content removed via the arrows on the sidebar in xcode):

require 'spec_helper' describe UsersController do render_views describe "GET 'show'" do ... end describe "GET 'new'" do ... end describe "POST 'create'" do ... end end

Full code at http://snipt.org/xtpm

最满意答案

在您发布的源链接中,很多块都使用DO而不是do 。 这肯定会引起您所描述的问题。

In the source link you posted, a lot of your blocks are using DO instead of do. This will definitely cause the issue you are describing.

更多推荐

本文发布于:2023-08-03 03:48:00,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1382941.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:恼人   错误   Error   RSPEC   Annoying

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!