rspec/rspec-its — pull request #33 by jamesottaway (2014-12-11 04:49:56+00:00)
Title: Use #public_send to disallow hitting private methods

Fixes #28.

If the subject looks like this:

``` ruby
class Person < Struct.new(:name)
private
def inner_name
"Inner #{name}"
end
end
```

then `its` shouldn't be able to hit the `inner_name` method. The following test:

``` ruby
describe Person do
subject { Person.new('John') }
describe '#inner_name' do
its(:inner_name} { is_expected.to eq 'Inner John' }
end
end
```

should raise a `NoMethodError`.