RSpec 使用字符串和哈希 - 语法错误

RSpec let with string and hash - syntax error

我正在尝试 let 结果是:

("project = TSW-123 AND status != Done AND status != Closed AND status != Cancelled AND status != Followup", {:max_results=>1000, :start_at=>0})

我的让:

  let(:jql_options) do
   "project = TSW-123 AND
    status != Done AND
    status != Closed AND
    status != Cancelled AND
    status != Followup",
    {
      start_at => 0,
      max_results => 1000
    }
  end

有错误:

syntax error, unexpected ',', expecting keyword_end
      status != Followup",

你想要 let 到 return 一个数组:

let(:jql_options) do
  [
    "project = TSW-123 AND status != Done AND status != Closed AND status != Cancelled AND status != Followup",
    {
      start_at => 0,
      max_results => 1000
    }
  ]
end