2008-05-21

关于if xx.save的问题

关键字: controller
比如 有这样一个方法: def create @itouch_service = ItouchService.new(params[:itouch_service]) @member = Member.find(session[:member_id]) @itouch_service.member = @member respond_to do |format| if @itouch_service.save flash[:notice] = 'ItouchService was successfully created.' ...
2008-03-17

集成测试

关键字: 集成测试问题
Loading development environment (Rails 2.0.1) 在试着集成测试时,遇到这样的问题:状态码是422 >> app.class app.class => ActionController::Integration::Session >> app.get"my_services/create" app.get"my_services/create" => 302 >> app.response.redirect_url app.response.redirect_url => "http://www.example.com/login" ...
2008-02-20

遇到问题

关键字: rails test
我练习测试一个字段为整数时,遇到如下问题,不知道是哪的原因! 1) Failure: test_integer_field(ItouchServiceTest) [test/unit/itouch_service_test.rb:32:in `test_integer_field' c:/ruby/lib/ruby/gems/1.8/gems/activesupport-2.0.1/lib/active_support/testi ng/default.rb:7:in `run']: <"鐣欒█娆℃暟蹇呴』涓烘暣鏁帮紒"> expected but was <ni ...
2008-02-01

路由测试问题

关键字: rout test
我在写路由测试的时候!我的路由测试代码如下: require File.dirname(__FILE__) + '/../test_helper' class ActionController::Routing::RoutesTest< ActiveSupport::TestCase def test_generates pts={:controller=>"members",:action=>"regist"} assert_generates("/members/regist",pts) end end 运行测试后,结果如下: Loaded sui ...
张云洁
搜索本博客
最近加入圈子
存档
最新评论