Gary Lin wrote:

describe "This tests uses return in my code" do
 it "should print Hello" do
puts "Hello" # skip some test scenario if product is in demo mode
     if @product.demoMode?
         return;

use 'break'

(However, generally speaking, tests should either pass or fail, and they should not skip any blocks.)

--
  Phlip

_______________________________________________
rspec-users mailing list
rspec-users@rubyforge.org
http://rubyforge.org/mailman/listinfo/rspec-users

Reply via email to