Sha256: 91f618a716ab51c6086464f210dd589e0b1b4bb1befe250c6fdb6ab4fb5b34c1
Contents?: true
Size: 602 Bytes
Versions: 65
Compression:
Stored size: 602 Bytes
Contents
require "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 |task, env| RESULTS[:foo] = :replaced end end b.invoke :task1, :results => results results[:foo].should eql(:replaced) end end
Version data entries
65 entries across 65 versions & 1 rubygems