test/system/rack_tests.rb in dassets-0.13.2 vs test/system/rack_tests.rb in dassets-0.14.0

- old
+ new

@@ -68,11 +68,11 @@ assert_equal Dassets['file1.txt'].content, resp.body end should "return a full response on invalid-range partial content requests" do # see http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.35 - env = { 'HTTP_RANGE' => ['bytes=3-2', 'bytes=abc'].choice } + env = { 'HTTP_RANGE' => ['bytes=3-2', 'bytes=abc'].sample } resp = get '/file1-daa05c683a4913b268653f7a7e36a5b4.txt', {}, env assert_equal 200, resp.status assert_equal Dassets['file1.txt'].content, resp.body end @@ -81,16 +81,16 @@ class DigestTests < SuccessTests setup do base_url = Factory.base_url Assert.stub(Dassets.config, :base_url){ base_url } - Dassets.config.file_store = TEST_SUPPORT_PATH.join('public').to_s + Dassets.config.file_store TEST_SUPPORT_PATH.join('public').to_s @url = Dassets['file1.txt'].url @url_file = Dassets.config.file_store.store_path(@url) end teardown do FileUtils.rm(@url_file) - Dassets.config.file_store = FileStore::NullStore.new + Dassets.config.file_store FileStore::NullStore.new end should "digest the asset" do assert_not_file_exists @url_file