spec/taza_tasks_spec.rb in scudco-taza-0.8.3 vs spec/taza_tasks_spec.rb in scudco-taza-0.8.4

- old
+ new

@@ -11,31 +11,35 @@ Rake.application = @rake end before :each do Dir.stubs(:taglob).returns([]) + Dir.expects(:glob).with('./spec/*/').returns(['./spec/functional/']) + Dir.expects(:glob).with('./spec/functional/*/').returns(['./spec/functional/foo/']) + Dir.expects(:glob).with('./spec/functional/*_spec.rb').returns([]) + Dir.expects(:glob).with('./spec/functional/foo/*/').returns(['./spec/functional/foo/page/']) + Dir.expects(:glob).with('./spec/functional/foo/*_spec.rb').returns([]) + Dir.expects(:glob).with('./spec/functional/foo/page/*/').returns([]) + Dir.expects(:glob).with('./spec/functional/foo/page/*_spec.rb').returns(['./spec/functional/foo/page/bar_spec.rb']) + load @file_name + Taza::Rake::Tasks.new end after :all do Rake.application = nil end it "should create rake spec tasks for all sites" do - Dir.stubs(:glob).with('./spec/functional/*/').returns(['./spec/functional/foo/']) - Dir.stubs(:glob).with('./spec/functional/foo/*_spec.rb').returns([]) - load @file_name - Taza::Rake::Tasks.new tasks.include?("spec:functional:foo").should be_true end it "should create rake spec tasks for all sites page specs" do - Dir.expects(:glob).with('./spec/functional/*/').returns(['./spec/functional/foo/']) - Dir.expects(:glob).with('./spec/functional/foo/*_spec.rb').returns(['./spec/functional/foo/page_spec.rb']) - load @file_name - Taza::Rake::Tasks.new tasks.include?("spec:functional:foo:page").should be_true end + it "should create rake spec tasks for all sites page specs in sub-folders" do + tasks.include?("spec:functional:foo:page:bar").should be_true + end def tasks @rake.tasks.collect{|task| task.name } end