Skip to content

Commit

Permalink
Apply temporary fix for upstream issue no. rspec#44
Browse files Browse the repository at this point in the history
  • Loading branch information
walterdolce committed May 23, 2017
1 parent 4473c9b commit e179805
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/rspec/its.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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] : '.'
attribute_chain = attribute.to_s.split(split_attribute_by)
attribute_chain.inject(subject) do |inner_subject, attr|
inner_subject.send(attr)
end
Expand Down

0 comments on commit e179805

Please sign in to comment.