Sha256: 4de3dd97cc686fefdda369fb5d7e34d5557d6980bbe123b7adb9f2af0ea90372

Contents?: true

Size: 650 Bytes

Versions: 20

Compression:

Stored size: 650 Bytes

Contents

require File.join(File.dirname(__FILE__), %w[.. .. spec_helper])

describe SC::Buildfile::Commands, 'task' do

  it "should add a new task to the buildfile" do
    b = SC::Buildfile.define do
      replace_task :task1 
    end
    b.task_defined?(:task1).should_not be_nil
  end
  
  it "should replace an existing task completely if defined" do
    results = {}
    b = SC::Buildfile.define do
      task :task1 do
        RESULTS[:foo] = :original
      end
      
      replace_task :task1 do
        RESULTS[:foo] = :replaced
      end
    end
    
    b.invoke :task1, :results => results
    
    results[:foo].should eql(:replaced)
  end

end

Version data entries

20 entries across 20 versions & 2 rubygems

Version Path
sproutit-sproutcore-1.0.0.20090407205609 spec/lib/buildfile_commands/replace_task_spec.rb
sproutit-sproutcore-1.0.0.20090408130025 spec/lib/buildfile_commands/replace_task_spec.rb
sproutit-sproutcore-1.0.0.20090416161445 spec/lib/buildfile_commands/replace_task_spec.rb
sproutit-sproutcore-1.0.20090721145236 spec/lib/buildfile_commands/replace_task_spec.rb
sproutcore-1.0.1046 spec/lib/buildfile_commands/replace_task_spec.rb
sproutcore-1.0.1043 spec/lib/buildfile_commands/replace_task_spec.rb
sproutcore-1.0.1042 spec/lib/buildfile_commands/replace_task_spec.rb
sproutcore-1.0.1037 spec/lib/buildfile_commands/replace_task_spec.rb
sproutcore-1.0.1035 spec/lib/buildfile_commands/replace_task_spec.rb
sproutcore-1.0.1031 spec/lib/buildfile_commands/replace_task_spec.rb
sproutcore-1.0.1030 spec/lib/buildfile_commands/replace_task_spec.rb
sproutcore-1.0.1029 spec/lib/buildfile_commands/replace_task_spec.rb
sproutcore-1.0.1027 spec/lib/buildfile_commands/replace_task_spec.rb
sproutcore-1.0.1028 spec/lib/buildfile_commands/replace_task_spec.rb
sproutcore-1.0.1026 spec/lib/buildfile_commands/replace_task_spec.rb
sproutcore-1.0.1025 spec/lib/buildfile_commands/replace_task_spec.rb
sproutcore-1.0.1024 spec/lib/buildfile_commands/replace_task_spec.rb
sproutcore-1.0.1009 spec/lib/buildfile_commands/replace_task_spec.rb
sproutcore-1.0.1008 spec/lib/buildfile_commands/replace_task_spec.rb
sproutcore-1.0.1003 spec/lib/buildfile_commands/replace_task_spec.rb