Sha256: 5dfd4604136c06f9270394066e13c30638220c746464e0a1a411b4241847c0bc
Contents?: true
Size: 1.08 KB
Versions: 3
Compression:
Stored size: 1.08 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 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 def tasks @rake.tasks.collect{|task| task.name } end end
Version data entries
3 entries across 3 versions & 2 rubygems
Version | Path |
---|---|
scudco-taza-0.8.3 | spec/taza_tasks_spec.rb |
taza-0.8.3 | spec/taza_tasks_spec.rb |
taza-0.8.2 | spec/taza_tasks_spec.rb |