Sha256: 8b6136d651cfcf93da3f9581a39e146f430d7db8653a852d243707d30e31b97e
Contents?: true
Size: 1.03 KB
Versions: 1
Compression:
Stored size: 1.03 KB
Contents
require 'spec/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([]) 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 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 tasks.include?("spec:functional:foo:page").should be_true end def tasks @rake.tasks.collect{|task| task.name } end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
scudco-taza-0.8.1 | spec/taza_tasks_spec.rb |