Method: Spec::Example::ExampleMethods#set_instance_variables_from_hash
- Defined in:
- lib/spec/example/example_methods.rb
#set_instance_variables_from_hash(ivars) ⇒ Object
:nodoc:
89 90 91 92 93 94 95 96 |
# File 'lib/spec/example/example_methods.rb', line 89 def set_instance_variables_from_hash(ivars) # :nodoc: ivars.each do |variable_name, value| # Ruby 1.9 requires variable.to_s on the next line unless ['@_implementation', '@_defined_description', '@_matcher_description', '@method_name'].include?(variable_name.to_s) instance_variable_set variable_name, value end end end |