so an average is adding them up, and dividing by the number in the array... We can simplify this code a bit:

```ruby
#step 1: get the values of .grade
grades = assignments.map(&:grade)

#step 2: add the grades together
total = grades.inject(:+)

#step 3: divide by total
average = total / assignments.size

# so you could end up with

def average_grade
  total = assignments.map(&:grade).inject(:+)
  total / assignments.size
end
```

You can reduce this further. So:

```ruby
def average_grade
  assignments.map(&:grade).inject(:+) / assignments.size
end
```

Finally, to make the testing of this easier, you could even pass in the assignments:

```ruby
def average_grade items
  items.map(&:grade).inject(:+) / items.size
end

# this would make testing easier:
describe "should provide an average grade for the class" do
  it "should provide an average grade" do
    assignment_doubles = [
      double(grade:95),
      double(grade:50),
      double(grade:85)
    ]
    subject.average_grade(assignment_doubles).should eq(75)
  end
end
```