我有一個非常簡單的module
我使用VCR gem測試Ruby。錄像機沒有錄像帶
我已根據文檔配置了VCR,但似乎無法獲取錄像帶目錄中的錄像帶。爲了以防萬一,我甚至將磁帶目錄上的權限更改爲777。真奇怪的是,我已經完全刪除卡帶目錄,運行規格,然後創建一個新的卡帶目錄。我使用Typhoeus
0.4.2與Hydra
。目前我無法升級Typhoeus。
相關的代碼:
require 'rspec'
require 'vcr'
require_relative File.join("..", "crawl_handler")
VCR.configure do |c|
c.cassette_library_dir = "spec/vcr_cassettes"
c.hook_into :fakeweb
c.allow_http_connections_when_no_cassette = false
end
... # => other describe statements
describe "#handle_http_response" do
before(:each) do
get_some_response = lambda {
# NOTE: typhoeus v. 0.5 is MUCH less setup :)
VCR.use_cassette("bme") do
request = Typhoeus::Request.new("www.bing.com")
hydra = Typhoeus::Hydra.new
hydra.queue(request)
hydra.run
response = request.response
end
}
@message = @subject.handle_http_response("www.bing.com", get_some_response.call)
end
it "returns a message hash" do
@message.should be_kind_of Hash
end
...
我不知道爲什麼盒沒有被寫入。
標題+1。我要關閉主題,並建議您清理唱片頭(或升級到藍光),但我想你是在談論Ruby代碼:) –
LOL!我非常想要解決這個問題,我甚至沒有注意到這一點。對於這個問題,我只是在磁帶上吹了一下,拔掉了電源插頭並將其插回。 – brycemcd