7
나는 다음과 같은 오류가 오전 아침 :RSpec에와 머시 오류 : 열려있는 파일이 너무 많습니다
14) Deal on creation sets frozen to false or nil
Failure/Error: Unable to find matching line from backtrace
Errno::EMFILE:
Too many open files - identify -format %wx%h '/var/folders/BJ/BJcTANEBFxWcan28U2YEKE+++TI/-Tmp-/stream20120229-36866-4l1sa8.gif[0]'
# ./spec/support/blueprints.rb:29:in `block in <top (required)>'
사양은 (심지어 spork로) 그렇게 망할 느리게 그래서 그들은 쓸모 있습니다. 한 모델에서 20 개의 예제를 실행하는 데 9 분이 걸립니다. blueprint.rb에서 29 행은 다음과 블록 사이 :
Company.blueprint do
name { "Office Tronic#{rand(10 ** 10)}" }
website { 'officetronic.com' }
subdomain {"officetronic#{rand(10 ** 10)}"}
facebook { 'officetronic' }
twitter { 'officetronic' }
description { 'We are a company dealing with electronics and office supply' }
address_line1 {'34 John Street'}
address_line2 {''}
post_code { 'EC2 3RR' }
phone { '01 343243434' }
city { 'London' }
your_name { 'john Doe' }
font_colour {'000000'}
logo_file_name { 'mylogo.png' }
logo_content_type { "application/png" }
logo_file_size { 100 }
end
Deal.blueprint do
company {Company.make!}
title { '50% off for web sites dev' }
description { '50% of discount...' }
quantity { 1 }
min_quantity { 0 }
start_time { Chronic.parse('one month') }
end_time { Chronic.parse('two months') }
price { 1500 } # in cents
shipping_cost{ 100 } # in cents
published { true }
small_print { 'Some text' }
show_map { true }
post_code { 'E1 6BJ' }
rrp {15}
end
나는이 오류가 spork을 사용할 때 발생한다는 것을 깨달았다 : rspec --drb spec/models/deal_spec.rb – rtacconi