Sha256: b7fe489b4a82a3f5242f60633ec59ddf1c4a9782972b99df1ee4a5e010946c03
Contents?: true
Size: 406 Bytes
Versions: 1
Compression:
Stored size: 406 Bytes
Contents
require 'spec_helper' class Example private def foo; end end describe Example do describe 'without the private shared context' do it 'cannot test private methods' do expect{subject.foo}.to raise_error NoMethodError end end describe 'with the private shared context', :private do it 'can test private methods' do expect{subject.foo}.not_to raise_error end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
rspec-context-private-0.0.1 | spec/lib/rspec/context/private/private_spec.rb |