Sha256: 55885ef33ea37dc4a27b35f5475a3ba4fcd32867e0da316fc53b15450fd6a4da

Contents?: true

Size: 380 Bytes

Versions: 9

Compression:

Stored size: 380 Bytes

Contents

def describe_private *args, &block
  example = describe *args, &block
  klass = args[0]
  if klass.is_a? Class
    saved_private_instance_methods = klass.private_instance_methods
    example.before do
      klass.class_eval { public *saved_private_instance_methods }
    end
    example.after do
      klass.class_eval { private *saved_private_instance_methods }
    end
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
ruby_odata-0.2.0.beta1 spec/support/describe_private.rb
ruby_odata-0.1.6 spec/support/describe_private.rb
ruby_odata-0.1.5 spec/support/describe_private.rb
ruby_odata-0.1.4 spec/support/describe_private.rb
ruby_odata-0.1.3 spec/support/describe_private.rb
ruby_odata-0.1.2 spec/support/describe_private.rb
ruby_odata-0.1.1 spec/support/describe_private.rb
ruby_odata-0.1.0 spec/support/describe_private.rb
ruby_odata-0.0.10 spec/support/describe_private.rb