www.appflying.com,iPhone and iPad, top Apps, drop price.
‘rspec’ 标签下的文章
十一 28

带着restful_authentication运行rspec时,貌似cookies无效的问题

2008年十一月28日,星期五,下午 2:02 | 分类:RailsNote | 给我留言(1 条留言) |

起因:在未做自己开发rspec的时候,只是调试下安装完 restful_authentication 的rspec和部分test时候,出现了几个错误: 1、 Spec::Mocks::MockExpectationError in ‘SessionsController Logging in by cookie fails cookie login with bad cookie’ fails cookie login with bad cookie(Spec::Rails::Example::ControllerExampleGroup::Subclass_1::Subclass_4) expected :cookies with (any args) once, but received it 0 times ./spec/controllers/authenticated_system_spec.rb:85: 2、 ‘SessionsController Logging in by cookie logs in with cookie’ FAILED expected true, got false ./spec/controllers/authenticated_system_spec.rb:81: 3、 ‘AccessControlTestController requesting xml; [...]

(阅读更多精彩内容...)
十一 28

在windows和netbeans6.5上,准备Rspce开发

2008年十一月28日,星期五,上午 8:08 | 分类:RailsNote | 给我留言 |

一、环境 ruby -v >> ruby 1.8.6 (2007-09-24 patchlevel 111) [i386-mswin32] rails -v >> Rails 2.1.2 二、需要安装的gem和plugin gem install ZenTest 因为我的Rails是2.1.2,所以在安装plugin时,用了下面的方法: ruby script/plugin install git://github.com/dchelimsky/rspec.git ruby script/plugin install git://github.com/dchelimsky/rspec-rails.git ruby script/generate rspec 另外还有一些辅助的工具,不在此详述 三、出现的问题 1、netbeans加载autotest时候的环境变量 解决:在系统环境中,需要加入home=当前项目的根文件夹,这样nb就能正常启用autotest了 2、restful_authentication的rspec时,出现mysql的Mysql::Error: Incorrect datetime value错误 mysql配置文件my.ini中,注释掉 sql-mode=”STRICT_TRANS_TABLES,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION” 一行(我的在87行) 下面添加一行:sql-mode=”" 重启mysql 四:参考文章 RubyTesting The Basics of Creating Rails Plugins,创建Rails插件的基础教程 RSpec的很重要的中文文档: http://www.letrails.cn/archives/20 http://www.letrails.cn/archives/advanced-rspec-tutorials-rspec-scaffold [...]

(阅读更多精彩内容...)
  • 信息发布
macbook pro



关于 里克
里克:本名李玮,全职SOHO开发,技术咨询
邮件:hi@liwei.me
QQ:5175486
MSN:liwei78@live.com
05年开办公司,从事企业网站开发及维护,后从事社会化搜索引擎研发,08年底至今从事sns开发。近期专注Rails3,工作笔记整理及iphone开发学习。

狂爱Fm系列游戏。喜欢研究电影。关注IT新闻。写原创剧本和使用the movies拍摄短片,剪辑能力极强。美剧迷。狂热的英超曼城球迷。32岁的东北人。