thoughtbot/shoulda-matchers — pull request #200 by demiazz (2012-12-02 19:25:58+00:00)
Title: Fix for ensure_inclusion_of and ensure_excluding_of with ranges

Now, matchers work incorrectly with ranges with excluded end.

Range#last returns last element.

```ruby
(1..5).last #=> 5
(1...5).last #=> 5
```

For getting maximum value need check #exclude_end? and get maximum value.