Registry / testing / rspec-context-private

rspec-context-private

JSON →
library0.0.1rbrubygemsunverified

RSpec shared context to make private methods temporarily public for testing.

gem install rspec-context-private
INSTALL
IMPORT
SIG · RSPEC-CONTEXT-PRIV
R
rspec-context-private
testingrubyv0.0.1
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

RSpec::Context::Private
require 'rspec/context/private'

Use shared context to expose private methods in RSpec tests.

require 'rspec/context/private' RSpec.describe MyClass do include_context 'with private methods public' it 'calls private method' do expect(subject.private_method).to eq(result) end end
Debug
Known issues
gotchaUsing this in production code can break encapsulation; intended only for testing.
fix
Only include this context in test files, never in application code.
affects: >= 0.0.1
Upgrade
Version history
0.0.1latest on RubyGems
Audit
Dependencies

No dependency data recorded yet.

Agent activity
10 hits · last 30 days
node
8
Amazon
1
Resources
rspec-context-private — gem install rspec-context-private · libregistry