# Return Function Tests

Students writes a function named `add_five()` that takes an integer as a parameter and returns 5 plus the parameter value.&#x20;

#### **Grading Tests:**

```ruby
require 'rspec'
require 'stringio'
require '/usercode/exampleb'

RSpec.describe "CodingRoomsUnitTests" do

    describe "Run add_five() with parameter 5" do
        it "expect the function to return 10" do
            expect(add_five(5)).to eq(10)
        end
    end

    describe "Run add_five() with parameter 0" do
        it "expect the function to return 5" do
            expect(add_five(0)).to eq(5)
        end
    end

    describe "Run add_five() with parameter 6" do
        it "expect the function to return 11" do
            expect(add_five(6)).to eq(11)
        end
    end

end
```

#### Sample Solution:

{% code title="example.rb" %}

```ruby
def add_five(number)
    number += 5
    return number
end

puts add_five(5)rub
```

{% endcode %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://auto-grade.joemazzone.net/ruby-examples/return-function-tests.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
