What is the difference between an it block and a specify block in RSpec?
subject { MovieList.add_new(10) }
specify { subject.should have(10).items }
it { subject.track_number.should == 10}
They seem to do the same job. Just checking to be sure.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
The methods are the same; they are provided to make specs read in English nicer based on the body of your test. Consider these two: