spec/sunscraper_spec.rb in sunscraper-1.2.0.beta1 vs spec/sunscraper_spec.rb in sunscraper-1.2.0.pre1
- old
+ new
@@ -103,19 +103,21 @@
with_webserver(HTML_LOCALSTORAGE) do |url|
Sunscraper.scrape_url(url).should include("OK")
end
end
- it "should withstand a lot of concurrent threads" do
- 500.times.map {
- Thread.new {
- Sunscraper.scrape_html(HTML_FUGA)
+ if worker == :embed
+ it "should withstand a lot of concurrent threads" do
+ 100.times.map {
+ Thread.new {
+ Sunscraper.scrape_html(HTML_FUGA)
+ }
+ }.each(&:join).
+ map(&:value).
+ each { |result|
+ result.should include('It works!')
}
- }.each(&:join).
- map(&:value).
- each { |result|
- result.should include('It works!')
- }
+ end
end
end
end
unless Sunscraper.os_x?
\ No newline at end of file