spec/taza_tasks_spec.rb in taza-0.8.7 vs spec/taza_tasks_spec.rb in taza-0.9.0
- old
+ new
@@ -1,31 +1,31 @@
-require 'spec/spec_helper'
+require 'spec_helper'
require 'rubygems'
require 'rake'
-require 'taglob'
describe "Taza Tasks" do
before :all do
@file_name ="./lib/taza/tasks.rb"
@rake = Rake::Application.new
Rake.application = @rake
end
before :each do
- Dir.stubs(:taglob).returns([])
Dir.expects(:glob).with('./spec/*/').returns(['./spec/functional/','./spec/mocks/'])
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'])
- Dir.expects(:glob).with('./spec/functional/**/*_spec.rb').returns(['./spec/functional/foo/page/bar_spec.rb'])
- Dir.expects(:glob).with('./spec/functional/foo/**/*_spec.rb').returns(['./spec/functional/foo/page/bar_spec.rb'])
- Dir.expects(:glob).with('./spec/functional/foo/page/**/*_spec.rb').returns(['./spec/functional/foo/page/bar_spec.rb'])
+ Dir.expects(:glob).with('./spec/functional/**/*_spec.rb').returns(['./spec/functional/foo/page/bar_spec.rb']).twice
+ Dir.expects(:glob).with('./spec/functional/foo/**/*_spec.rb').returns(['./spec/functional/foo/page/bar_spec.rb']).twice
+ Dir.expects(:glob).with('./spec/functional/foo/page/**/*_spec.rb').returns(['./spec/functional/foo/page/bar_spec.rb']).twice
Dir.expects(:glob).with('./spec/mocks/**/*_spec.rb').returns([])
+ Dir.expects(:glob).with('./spec/functional/foo/page/bar_spec.rb').returns(['./spec/functional/foo/page/bar_spec.rb'])
+
load @file_name
Taza::Rake::Tasks.new
end
after :all do