modified rspec matcher to avoid deprecation