我有Ruby代碼是或多或少這個樣子的 offset = 0
index = 1
User.establish_connection(..) # db1
class Member < ActiveRecord::Base
self.table_name = 'users'
end
Member.establish_connection(..) #db2
while tru
這是我的項目目錄中的rspec binstub。 #!/usr/bin/env ruby
begin
load File.expand_path("../spring", __FILE__)
rescue LoadError
end
# frozen_string_literal: true
#
# This file was generated by Bundler.
#
我的測試中有一個問題。 我有這個天賦: context 'when no section is supplied' do
it 'raises an ArgumentError regarding the missing section_id argument' do
expect do
described_class.with_section
end.t