Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix for upstream issue no. #44 #68

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

walterdolce
Copy link

@walterdolce walterdolce commented Mar 19, 2019

This should fix #44

Copy link
Member

@JonRowe JonRowe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This breaks the build currently due to the fact metadata (options) is a hashlike object. We'd also want specs to cover a new feature / fix.

@@ -110,7 +110,8 @@ def its(attribute, *options, &block)
subject[*attribute]
end
else
attribute_chain = attribute.to_s.split('.')
split_attribute_by = !options.empty? && options[0][:split_attribute_by] ? options[0][:split_attribute_by] : '.'
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

options should be a hash, the metadata hash, we have tests relying on this so I'm confused why its an array here? Also stylistically we'd do options.fetch(:split_attribute_by, '.') rather than a ternary.

@JonRowe JonRowe changed the base branch from master to main August 2, 2020 01:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

rspec-its breaking InSpec
2 participants