惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

GbyAI
GbyAI
Martin Fowler
Martin Fowler
I
InfoQ
腾讯CDC
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
爱范儿
爱范儿
Microsoft Security Blog
Microsoft Security Blog
Google DeepMind News
Google DeepMind News
D
DataBreaches.Net
云风的 BLOG
云风的 BLOG
F
Fortinet All Blogs
N
Netflix TechBlog - Medium
博客园 - 聂微东
Microsoft Azure Blog
Microsoft Azure Blog
D
Docker
博客园 - 三生石上(FineUI控件)
Y
Y Combinator Blog
博客园 - Franky
Engineering at Meta
Engineering at Meta
B
Blog
罗磊的独立博客
Apple Machine Learning Research
Apple Machine Learning Research
Jina AI
Jina AI
V
Visual Studio Blog

Ruby on Rails

以后发软件库是不是只用发 spec? OpenCode + GLM-4.7 还是弟弟, Antigravity + Gemini 3 Pro 还是强不少,不写一行代码转译了一个 Gem: rb-edge-tts Ruby on Rails 用着太舒服了 手把手教您在 Baklib 上搭建一个模板网站 我回来了, Ruby on Rails Ruby on Rails 国内使用情况 推荐一个 Admin Panel 当我更换 mac m2 芯片 无法使用使用 mysql2 报错 symbol not found in flat namespace (_mysql_affected_rows) 后端收到两次重复 api 请求,如何判断第二次是重复的? Rails 7 发布 大家写 ruby on rails applications 的时候一般怎么写前端页面? 如何动态显示和保存一系列输入框中的内容 ruby on rails: no implicit conversion of nil into String Rails 现在国内是不是有点凉了? Rails 6.1 升级记录 使用 Vue 前端、Rails 后端实现图片上传的功能 写了个在线约会的日历,已经部署在公有云上了,正文有访问链接 Ruby, Rails 不值一学 Rails new 命令一直转圈怎么办? 大家都用什么来部署 ROR 的? ruby on rails 做 web 开发,效率真是杠杠的啊 如果有一天 DHH 没有再维护 ror 了怎么办? Ruby on Rails 怎么样? 世界无人帆船锦标赛,招募两名 Ruby 志愿者的参与 spree 电商框架怎么样 送几本《Rails 5 敏捷开发》 Rails 布署最佳实践 Rails Seed Migration 问题 心好累 ruby 发一个 OAuth1.0 的请求怎么这么难 Ruby on Rails 的工程怎么做 heap dump?
正在看 restful rail development 这本书,按照书上写的测试...
Caojx · 2018-12-16 · via Ruby on Rails

rails 版本 5.2.2
require 'test_helper'
class SayControllerTest < ActionDispatch::IntegrationTest
test "should get hello" do
get say_hello_url
assert_response :success
end
test "should say hello in json" do
get say_hello_url
assert_equal "{\"hello\":\"Rails!\"}", @response.body
end
test "should say hello in json" do
get say_hello_url,{'user'=>"Join"}
assert_equal "{\"hello\":\"Join!\"}", @response.body
end
end