Question: I would like to test if an instance variable lies in a range of numbers:

```
#part of the tested class
class Item
  def initialize(value = 70 + rand(30))
    @value = value
  end

```

I tried the assertions in [minitest assertions list](http://bfts.rubyforge.org/minitest/MiniTest/Assertions.html) but they didn't work. I solved the problem by using assert\_in\_delta as shown below:

```
#test_value.rb
class ValueTestCase < Test::Unit::TestCase
  def test_if_value_in_range
    item = Item.new
    assert_in_delta(85, item.value, 15)
  end
end

```

But would like to know if there is a formal assertion for this.

Answer: 
Another way would be to use `Range#include?`:

```
assert_includes 70..100, p.value

```
```
assert(item.value.between?(70, 100))

```