rspec/rspec-expectations — pull request #365 by yujinakayama (2013-11-21 14:16:11+00:00)
Title: Fix wrong auto-generated descriptions with falsey expected value

Currently this spec example:

```ruby
describe 'wrong auto-generated descriptions' do
subject { nil }
it { should be nil }
end
```

generates the following description:

```bash
$ rspec --format documentation test_spec.rb

wrong auto-generated descriptions
should equal
# ^^^ Missing "nil"!
```

This is because `BaseMatcher#description` checks whether expected value is set or not by checking if the value is truthy in conditional semantics. However this does not work if the expected value is `false` or `nil`.

This change fixes the issue by checking whether ivar `@expected` is defined or not and skip definition of `@expected` if the parameter to `BaseMatcher.new` is omitted.

I've confirmed `2-99-maintenance` and `2-14-maintenance` branches also have this issue.