Sha256: 5b3eb9a8bf5941759f732d69fc498cc348a621360ae44274147c2b79ab4c4c29
Contents?: true
Size: 786 Bytes
Versions: 5
Compression:
Stored size: 786 Bytes
Contents
module RSpec module Core class Example alias :initialize_without_execute :initialize def initialize(example_group_class, description, metadata, example_block=nil) if example_block example_block_with_execute = Proc.new do |*args| if @execute_block self.instance_variable_set('@execute_result', instance_exec(&@execute_block)) end instance_exec(*args, &example_block) end end initialize_without_execute(example_group_class, description, metadata, example_block_with_execute) end end class ExampleGroup def self.execute(&execute_block) before do @execute_block = execute_block end end end end end
Version data entries
5 entries across 5 versions & 1 rubygems