require 'spec_helper' describe TodoNext::Tree::Visitor::RspecGenerator, 'fine-tuning' do it 'visits the tree depth-first' do source = 'HEADER 1' + "\n" + ' HEADER 2' + "\n" + ' - HEADER 3' + "\n" + ' √ spec a' + "\n" + ' * spec b' + "\n" + ' - spec c' expected =< "* spec b"){} it("spec c", :pending => "spec c"){} end end end RUBY TodoNext(source).should == expected end it 'ignores the example blocks' do source = 'A Foo' + "\n" + ' it can be created' + "\n" + ' ex: ' + "\n" + ' Foo.create' + "\n" + ' it can be deleted' expected =< "it can be created"){} it("it can be deleted", :pending => "it can be deleted"){} end RUBY source = 'A Foo' + "\n" + ' it can be created' + "\n" + ' ex: ' expected =< "it can be created"){} end RUBY TodoNext(source).should == expected end end