Skip to content

Commit 83a1f45

Browse files
committed
Fix exception class, message in unit test
1 parent af5b989 commit 83a1f45

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

test/instance_agent/file_credentials_test.rb

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
require 'test_helper'
2+
require 'aws-sdk-core'
23

34
class FileCredentialsTest < InstanceAgentTestCase
45
context 'With the file credentials' do
@@ -52,7 +53,7 @@ class FileCredentialsTest < InstanceAgentTestCase
5253
end
5354

5455
should 'raise error when credential file is missing' do
55-
assert_raised_with_message("Failed to load credentials from path #{credentials_path}", RuntimeError) do
56+
assert_raised_with_message("Profile `default' not found in #{credentials_path}", Aws::Errors::NoSuchProfileError) do
5657
InstanceAgent::FileCredentials.new(credentials_path)
5758
end
5859
end

0 commit comments

Comments
 (0)