The pupils were given a talk on chemical addiction and the number of dangerous substances in cigarettes before they agreed to stub out the habit.
The scheme, undertaken at an unnamed secondary school, was one of several praised by Ofsted this week for raising health awareness in schools.
Inspectors visited 18 primary, secondary and special schools, known for the quality of their health education, between summer 2005 and spring 2006.
One secondary school had removed all vending machines and consulted parents over school menus, while a special school set up a "smoothie" workshop in which pupils studied the smell, taste and texture of various foods.
A village primary school encouraged the use of Fair Trade products and consumption of locally-grown produce.
Inspectors found that where schools had achieved accreditation under the National Healthy Schools Programme, they were making a "valuable contribution to pupils' health and well-being".
The report said: "Since the introduction of the Every Child Matters agenda, the schools were very aware of this area of their work. Schools saw their responsibilities not only as teaching children about being safe and healthy, but also about helping them to adopt healthier lifestyles, enhance their self-esteem, eat and drink well, and stay safe."
It found that schools with the most effective schemes recognised the link between physical well-being and the readiness to learn, and created an ethos which promoted health.
In 13 of the 18 schools, pupils were taught skills to make healthy choices, but in a few it was found that not enough was taught about the perils of drugs, smoking and alcohol, inspectors said.
The report said that where food was not produced on school premises, there was poor nutritional value in some school meals.
All the schools provided opportunities for physical activity, although three of them were limited by a lack of outdoor facilities.
Some secondary schools were criticised for failing to build on what pupils had learnt at primary school. The report said that this caused work across the curriculum to be fragmented.
Inspectors recommended that the Government should provide more resources to schools to help them get across the healthy-eating message.
They also said that schools should involve parents and pupils more in promoting healthier lifestyles and make sure children get enough exercise.