Ruby China
  • 社区
  • 招聘
  • Wiki
  • 酷站
  • Gems
  • 注册
  • 登录
Jiazhen Xie
@jiazhen
会员
第 15710 位会员 / 2014-11-02

3 篇帖子 / 78 条回帖
3 关注者
0 正在关注
0 收藏
GitHub Public Repos
  • em-capacity-app 8

    The app calculates engineering capacity by considering holidays, absences, and split roles where ...

  • releasehub 6

    Deliver codes faster and easier

  • LaTexCV 1

  • jiazhenxie-net 0

  • jiazhenxie 0

  • montecarlo-rb 0

    MonteCarloRB is a Ruby library designed to perform Monte Carlo simulations based on historical da...

  • docker-api-only 0

  • personal-website 0

    A personal resume website template built with React.js, Typescript, Next.js, and styled with Tail...

  • sheerdevelopment 0

    The personal website

  • etl-serverless 0

    build the API

More on GitHub
  • 概况
  • 话题
  • 回帖
  • 收藏
  • 正在关注
  • 关注者
  • Selenium webdriver 调起来 Firefox 浏览器却无法访问设定的网址? at 2016年01月17日

    #5 楼 @rubysir 最新的 selenium-webdriver 2.49 (released on January 13 2016) 应该不支持最新的 firefox 版本,relative https://github.com/SeleniumHQ/selenium/issues/1385

    在使用 selenium-webdriver 做自动化测试的时候,不要随意更新 gem 和浏览器的版本。我们是在 branch 下测试成功后才 upgrade 的

  • Ruby China on PostgreSQL at 2016年01月17日

    #3 楼 @huacnlee 我正打算使用 mongoDB,请问出于什么考虑要换?

  • 学驾照有用吗? at 2016年01月16日

    一定要学!今年考了两次都没过。。。后悔有时间的时候没有学

  • Selenium webdriver 调起来 Firefox 浏览器却无法访问设定的网址? at 2016年01月16日

    #2 楼 @rubysir 一般是版本问题,特别是 firefox. 你这个情况要 debug,要根据错误信息去找。只看表面状况只能猜测版本问题。

  • Selenium webdriver 调起来 Firefox 浏览器却无法访问设定的网址? at 2016年01月15日

    Did you recently upgrade your firefox? Check the firefox version and your selenium webdriver gem version. Both up to date should work.

  • 全新的站内搜索上线 at 2016年01月06日

    同事推荐过 Elasticsearch,准备应用到自己的项目 :plus1:

  • Show RC - ReleaseHub at 2016年01月05日

    #3 楼 @adamshen 你好,这里没有特别的原因。主要是我之前需要用到返回值,所以用的 map :)

  • Show RC - ReleaseHub at 2015年12月30日

    #1 楼 @adamshen 😄 cheers

  • 通过 ActiveRecord 访问原有的数据库, rails 如何连接 sqlserver 2008 at 2015年12月21日

    Build your own api::Activeresource. The #find, #save etc actions are actually making api calls.

  • undefined method `register_preprocessor' for nil:NilClass (NoMethodError) at 2015年12月21日

    Why not use https://github.com/twbs/bootstrap-sass? Never use less-rails before

  • undefined method `add_product' for 12:Fixnum at 2015年12月11日

    @msg7086 you're right. It will throw error if not found. (Apologise that I can't type CN on this machine...)

    Release Load (6.1ms)  SELECT  `releases`.* FROM `releases` WHERE `releases`.`id` = 99 LIMIT 1
    ActiveRecord::RecordNotFound: Couldn't find Release with 'id'=99
    
  • Ruby 是如何解释运行程序的 at 2015年12月11日

    :plus1:

  • undefined method `add_product' for 12:Fixnum at 2015年11月12日

    Do not use exception as the control flow ...

    def current_cart
      cart = Cart.find(session[:cart_id]) || Cart.create
      session[:cart_id]  ||= cart.id
      cart
    end
    
  • [上海] 触易通科技有限公司招聘 Rails、ios、安卓工程师 at 2014年12月07日

    看了 2 楼的帖子,感觉事件没有个结论。只是纯属个人好奇

  • 一般你们需要多长时间熟悉公司的项目然后参加开发? at 2014年11月18日

    根据我在公司的经验,给新人的 get started 文件可以帮助新同事尽快 pick up. 同时给一个 high level overview,即可开始加入开发做小 task. Orientation 一般两到三天. 以上 ^^

  • RubyConf San Diego 2014 直播 at 2014年11月18日

    :plus1:

  • Virtual Conference - hacksummit at 2014年11月13日

    #1 楼 @hbin 👍 好多大牛参加

  • 初学 rspec mock 想问 each 方法怎么测试。。。 at 2014年11月11日

    #5 楼 @wxliuzifan The RSpec Book

    If you're a QA, learn cucumber and automation.

  • 初学 rspec mock 想问 each 方法怎么测试。。。 at 2014年11月11日

    #2 楼 @wxliuzifan 哪一行报错?这里可能性很多光这样贴出代码很难 debug..

    另外

    expect(@sqlite_database).to receive(:authorSearch).with('author1').and_return(@book1,@book2)
    

    你这里表达的意思是让@sqlite_database调用authorSearch方法,参数是author1, 然后第一次会返回@book1, 第二次返回@book2, 如果@sqlite_database根本没有这个方法,那当然会抛出NoMethodError

    根据你的表达,我觉得你是想用 mock

    allow(@sqlite_database).to receive(:authorSearch).with('author1').and_return(@book1,@book2)
    

    然后当你接下来调用@sqlite_database.authorSearch('author1') 时,第一次会返回@book1, 第二次返回@book2

    Make sense? FYI - https://coderwall.com/p/e80caq/rspec-allow-vs-expect

  • 初学 rspec mock 想问 each 方法怎么测试。。。 at 2014年11月11日

    Can you specify what do you really want to test here?

    If you are testing the logic inside the each, you can do

    result = { ab: "xxx" } # your expected output here
    actual = books.each { |p| isbns.insert(0,"#{p.isbn}_") }
    expect(result).to eq(actual)
    
  • 有办法丢弃某些 commit 么? at 2014年11月10日

    #4 楼 @lawrence 看到上面的链接了吗?应该可以解决你的问题。

    • 导出 git commit history
    • 在文本 editor 中修改
    • 导入
    • Done
  • 有办法丢弃某些 commit 么? at 2014年11月10日

    #2 楼 @lawrence Ahhh, 不好意思,没看仔细以为你只想修改 commit history The Solution in Stack Overflow

  • 有办法丢弃某些 commit 么? at 2014年11月10日

    Squash 这些 commits. git rebase -i HEAD~2 # squash the last 2 commits

    Git interactive rabase

  • 为什么要使用 FactoryGirl? at 2014年11月07日

    This is a good article about fixtures v.s. factorygirls

  • 建议 ruby-china 添加站内搜索功能 at 2014年11月07日

    I'm the PM and will label this as LOW PRIORITY :trollface:

  • Grape + RSpec 测试 如何 mock at 2014年11月07日

    @TsingHan Sorry for the delay. 今天刚刚看到。

    Ahh, 原因是在fetch_club方法。它不是直接查询数据库或者直接使用 Club Object. 而是用 Grape 调用一个 api call。所以你应该 mock 的是Grape::Endpoint. 这里的信息 miss 了。

    你用 mock 的时候,应该想清楚到底要 mock 哪个 object. 另外,RSpec 支持 verify_double, 完善了以前double的一个漏洞。FYI - http://relishapp.com/rspec/rspec-mocks/docs/verifying-doubles

  • [北京] 笨笨理财网寻找独挡一面的高级 Rails 工程师 2 名 at 2014年11月07日

    #1 楼 @diehard :learning_organisation miss 了 validates, ambitions is the plural form :trollface: Joking, good attempt :plus1:

  • 上一页
  • 1
  • 2
  • 3
  • 下一页
关于 / RubyConf / Ruby 镜像 / RubyGems 镜像 / 活跃会员 / 组织 / API / 贡献者
由众多爱好者共同维护的 Ruby 中文社区,本站使用 Homeland 构建,并采用 Docker 部署。
服务器由 赞助 CDN 由 赞助
iOS 客户端 / Android 客户端 简体中文 / English