justi
justi

Reputation: 4106

Ruby: How to check class method is private inside test?

Inside rspec test, i have to check that my class method is private or public. How i can do this?

Upvotes: 1

Views: 201

Answers (1)

BroiSatse
BroiSatse

Reputation: 44705

Try:

expect(MyClass.private_methods).to include :my_method

Upvotes: 2

Related Questions