test/integration/blob/blob_pages_test.rb in azure-0.7.0.pre vs test/integration/blob/blob_pages_test.rb in azure-0.7.0.pre2
- old
+ new
@@ -10,31 +10,31 @@
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#--------------------------------------------------------------------------
-require "integration/test_helper"
-require "azure/blob/blob_service"
+require 'integration/test_helper'
+require 'azure/blob/blob_service'
describe Azure::Blob::BlobService do
subject { Azure::Blob::BlobService.new }
after { TableNameHelper.clean }
let(:container_name) { ContainerNameHelper.name }
- let(:blob_name) { "blobname" }
- let(:blob_name2) { "blobname2" }
+ let(:blob_name) { 'blobname' }
+ let(:blob_name2) { 'blobname2' }
let(:length) { 2560 }
before {
subject.create_container container_name
subject.create_page_blob container_name, blob_name, length
subject.create_page_blob container_name, blob_name2, length
}
describe '#create_blob_pages' do
it 'creates pages in a page blob' do
- content = ""
- 512.times.each{|i| content << "@" }
+ content = ''
+ 512.times.each{|i| content << '@' }
subject.create_blob_pages container_name, blob_name, 0, 511, content
subject.create_blob_pages container_name, blob_name, 1024, 1535, content
ranges = subject.list_page_blob_ranges container_name, blob_name, { :start_range => 0, :end_range => 1536 }
@@ -45,33 +45,33 @@
end
end
describe 'when the options hash is used' do
it 'if none match is specified' do
- content = ""
- 512.times.each{|i| content << "@" }
+ content = ''
+ 512.times.each{|i| content << '@' }
blob = subject.create_blob_pages container_name, blob_name2, 0, 511, content
assert_raises(Azure::Core::Http::HTTPError) do
subject.create_blob_pages container_name, blob_name2, 1024, 1535, content, { :if_none_match => blob.properties[:etag] }
end
end
it 'if match is specified' do
- content = ""
- 512.times.each{|i| content << "@" }
+ content = ''
+ 512.times.each{|i| content << '@' }
blob = subject.create_blob_pages container_name, blob_name, 0, 511, content
subject.create_blob_pages container_name, blob_name, 1024, 1535, content, { :if_match => blob.properties[:etag] }
end
end
- describe "#clear_blob_pages" do
+ describe '#clear_blob_pages' do
before {
- content = ""
- 512.times.each{|i| content << "@" }
+ content = ''
+ 512.times.each{|i| content << '@' }
subject.create_blob_pages container_name, blob_name, 0, 511, content
subject.create_blob_pages container_name, blob_name, 1024, 1535, content
subject.create_blob_pages container_name, blob_name, 2048, 2559, content
@@ -83,11 +83,11 @@
ranges[1][1].must_equal 1535
ranges[2][0].must_equal 2048
ranges[2][1].must_equal 2559
}
- describe "when both start_range and end_range are specified" do
+ describe 'when both start_range and end_range are specified' do
it 'clears the data in page blobs within the provided range' do
subject.clear_blob_pages container_name, blob_name, 512, 1535
ranges = subject.list_page_blob_ranges container_name, blob_name, { :start_range => 0, :end_range => 2560 }
ranges.length.must_equal 2
@@ -99,11 +99,11 @@
end
end
describe '#list_page_blob_ranges' do
before {
- content = ""
- 512.times.each{|i| content << "@" }
+ content = ''
+ 512.times.each{|i| content << '@' }
subject.create_blob_pages container_name, blob_name, 0, 511, content
subject.create_blob_pages container_name, blob_name, 1024, 1535, content
}