Skip to content

Commit

Permalink
Rubocop fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
alextwoods committed Jan 6, 2025
1 parent 09b2790 commit 3825060
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
1 change: 1 addition & 0 deletions gems/smithy/lib/smithy/forge/client.rb
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ def forge

private

# rubocop:disable Metrics/AbcSize
def source_files
Enumerator.new do |e|
e.yield "#{@gem_name}.gemspec", render_gemspec
Expand Down
8 changes: 6 additions & 2 deletions gems/smithy/spec/interfaces/client/shapes_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,9 @@
end

it 'has a type variation of the shape when applicable' do
skip("Test does not expect the generated #{id} to have a type") unless %w[structure union].include?(shape['type'])
unless %w[structure union].include?(shape['type'])
skip("Test does not expect the generated #{id} to have a type")
end

expected_type = Object.const_get("#{types_module}::#{shape_name}")
expect(generated_shape.type).to eq(expected_type)
Expand Down Expand Up @@ -89,7 +91,9 @@

context 'key and value members' do
it 'are shapes of expected member names, shapes and contains traits when applicable' do
skip("Test does not expect the generated #{id} to have a key/value members") if shape['key'].nil? && shape['value'].nil?
if shape['key'].nil? && shape['value'].nil?
skip("Test does not expect the generated #{id} to have a key/value members")
end

expect(generated_shape.key.name).to eq('key')
expect(generated_shape.value.name).to eq('value')
Expand Down

0 comments on commit 3825060

Please sign in to comment.