Rspec to have(n).items undefined method Rspec to have(n).items undefined method ruby ruby

Rspec to have(n).items undefined method


The have/have_exactly, have_at_least and have_at_most matchers were removed from RSpec 3. They're now in the separate rspec-collection_matchers gem.

Or, as zishe says, instead of installing the gem, you can just use eq instead of have/have_exactly, and be >= instead of have_at_least and be <= instead of have_at_most.

Source: http://myronmars.to/n/dev-blog/2014/05/notable-changes-in-rspec-3