diff --git a/ruby/example_code/iam/spec/manage_roles_spec.rb b/ruby/example_code/iam/spec/manage_roles_spec.rb index 35711665df9..80cbf7940a1 100644 --- a/ruby/example_code/iam/spec/manage_roles_spec.rb +++ b/ruby/example_code/iam/spec/manage_roles_spec.rb @@ -1,6 +1,6 @@ -require 'aws-sdk-iam' -require 'rspec' -require_relative '../manage_roles' +require "aws-sdk-iam" +require "rspec" +require_relative "../manage_roles" describe RoleManager do let(:iam_client) { Aws::IAM::Client.new } @@ -19,7 +19,7 @@ ] } } - let(:policy_arns) { ['arn:aws:iam::aws:policy/ReadOnlyAccess'] } + let(:policy_arns) { ["arn:aws:iam::aws:policy/ReadOnlyAccess"] } before(:each) do role_manager.create_role(role_name, assume_role_policy_document, policy_arns) @@ -29,31 +29,31 @@ role_manager.delete_role(role_name) rescue nil # Clean up role end - describe '#create_role' do - it 'creates a role and returns its ARN' do + describe "#create_role" do + it "creates a role and returns its ARN" do role_arn = role_manager.create_role(role_name, assume_role_policy_document, policy_arns) expect(role_arn).to be_a(String) - expect(role_arn).to include('arn:aws:iam::') + expect(role_arn).to include("arn:aws:iam::") end end - describe '#list_roles' do - it 'lists available roles' do + describe "#list_roles" do + it "lists available roles" do roles = role_manager.list_roles(100) # Adjust count as necessary expect(roles).to include(role_name) end end - describe '#get_role' do - it 'retrieves data about a specific role' do + describe "#get_role" do + it "retrieves data about a specific role" do role = role_manager.get_role(role_name) expect(role).to be_a(Aws::IAM::Role) expect(role.role_name).to eq(role_name) end end - describe '#delete_role' do - it 'deletes a specified role' do + describe "#delete_role" do + it "deletes a specified role" do expect { role_manager.delete_role(role_name) }.not_to raise_error end end