spec/integration/folder_operations_spec.rb in rmega-0.2.0 vs spec/integration/folder_operations_spec.rb in rmega-0.2.1
- old
+ new
@@ -1,19 +1,19 @@
require 'integration_spec_helper'
describe 'Folders operations' do
- if account_file_exists?
+ if account?
before(:all) do
@storage = login
end
- let(:name) { "test_folder" }
-
context 'when #create_folder is called on a node' do
+ let(:name) { "testfolder_#{SecureRandom.hex(5)}" }
+
before do
@folder = @storage.root.create_folder(name)
end
it 'creates a new folder under that node' do
@@ -25,10 +25,13 @@
@folder.delete
end
end
context 'searching for a folder by its handle' do
+
+ let(:name) { "testfolder_#{SecureRandom.hex(5)}" }
+
before do
@folder = @storage.root.create_folder(name)
end
it 'returns the matching folder' do
@@ -40,9 +43,12 @@
@folder.delete
end
end
context 'when #create_folder under created folder' do
+
+ let(:name) { "testfolder_#{SecureRandom.hex(5)}" }
+
before do
@folder = @storage.root.create_folder(name)
@sub_folder = @folder.create_folder(name)
end