File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 5858 it "should raise if key is not provided" do
5959 Cloudinary . config . auth_token [ :key ] = nil
6060 token = { :expiration => 111111 , :duration => 0 }
61- expect { Cloudinary ::Utils . generate_auth_token ( token ) } . to raise_error
61+ expect { Cloudinary ::Utils . generate_auth_token ( token ) } . to raise_error ( /Missing auth token key configuration/ )
6262 end
6363 it "should raise if expiration and duration are not provided" do
6464 token = { :key => KEY , :expiration => 0 , :duration => 0 }
65- expect { Cloudinary ::Utils . generate_auth_token ( token ) } . to raise_error
65+ expect { Cloudinary ::Utils . generate_auth_token ( token ) } . to raise_error ( /Must provide either expiration or duration/ )
6666 end
6767 end
6868 describe "authentication token" do
Original file line number Diff line number Diff line change @@ -163,7 +163,7 @@ def reset_metadata
163163
164164 after :each do
165165 Cloudinary . config . static_image_support = @static_support
166- Cloudinary ::Static ::METADATA_FILE = @static_file
166+ Kernel :: silence_warnings { Cloudinary ::Static ::METADATA_FILE = @static_file }
167167 Cloudinary ::Static . reset_metadata
168168 end
169169
@@ -175,7 +175,7 @@ def reset_metadata
175175 Cloudinary . config . static_image_support = false
176176 expect ( helper . image_path ( '/images/foo.jpg' ) ) . to eq ( '/images/foo.jpg' )
177177 expect ( helper . image_path ( 'some-folder/foo.gif' ) ) . to eq ( "/images/some-folder/foo.gif" )
178- Cloudinary ::Static ::METADATA_FILE = "spec/sample_asset_file.tsv"
178+ Kernel :: silence_warnings { Cloudinary ::Static ::METADATA_FILE = "spec/sample_asset_file.tsv" }
179179 Cloudinary ::Static . reset_metadata
180180 expect ( helper . image_path ( '/images/foo.jpg' ) )
181181 . to eq ( "/images/foo.jpg" )
You can’t perform that action at this time.
0 commit comments