```ruby
# test.rb
class Object
def in?(other) = other.include? self
end
RSpec.describe 'example' do
it 'matches if a value exist in an array' do
expect(1).to be_in([1, 2, 3])
end
end
```
if you run it:
```bash
$ rspec test.rb
.
Finished in 0.00226 seconds (files took 0.0285 seconds to load)
1 example, 0 failures
$
```
if you are in Rails you have https://api.rubyonrails.org/classes/Object.html#method-i-in-3F and do not need to modify Object.