This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
context "create questions and answers for the exam" do | |
let(:build_object) { mock().as_null_object } | |
it "should instantiate at least 3 questions" do | |
exam_questions = mock("questions for an exam").as_null_object | |
Exam.any_instance.stub(:questions).and_return(exam_questions) | |
exam_questions.stub(:build).and_return(build_object) | |
exam_questions.should_receive(:build).exactly(3).times | |
get :new |
NewerOlder