questions on panda for now, will finish rest too#4
Conversation
There was a problem hiding this comment.
There's no assertion here, right? What are you testing here?
There was a problem hiding this comment.
Where is your "AverageGrade" class defined?
|
both your RSpec and cucumbers fail with these two errors:
I recommend you get your rspec passing first, and then look at cucumber. Final suggestion: you are submitting many, many episodes at once. That can't be easy to keep straight in your head. Skills build on each other. I recommend you pick one to get working, then choose another. |
|
Right on. |
|
The only thing not passing in my Rspec is the average_grade method that is clearly defined. P.S. From now on I will look to complete one assignment at a time. Good call. |
OK, so there are a couple of problems in your code. Let's start with the exception: It's saying we are calling average_grade when it hasn't been defined. It also tells us that teacher_spec line 25 is the offending line. Let's take a look: describe AverageGrade do
it "should view average grade for the class" do
average_grade.average.should eq(class_grade/class_total)
end
endHere you are calling describe AverageGrade do
let(:average_grade) { AverageGrade.new }
it "should view average grade for the class" do
average_grade.average.should eq(class_grade/class_total)
end
end
describe AverageGrade do
it "should view average grade for the class" do
AverageGrade.new.average.should eq(class_grade/class_total)
end
end |
|
OK, so let's say you do that... Then it will fail because the AverageGrade class is not setup correctly. Let's look at it class AverageGrade
def initialize
@average_grade = average_grade
@class_total = class_total
@class_grade = class_grade
end
#...
endAfter you do You probably wanted those as inputs to the class, but you're missing the parameters on your initialize method. |
|
Hmmm. Now I am getting wrong number of arguments (0 for 3) So now I think I should be making a method housing AverageGrade.new |
|
yeah, check out my comments here: #4 (comment) |
|
And more specifically, if you have a method with |
I will do Tiger and Eagle after Panda.
Cannot see why why features 7 and 8 will not pass!