Sha256: aa7b0f51e57a910a5c7ff9ebbd74bee8b272964ce88a9911cae02c87d148618b

Contents?: true

Size: 612 Bytes

Versions: 26

Compression:

Stored size: 612 Bytes

Contents

require File.expand_path("../../spec_helper", File.dirname(__FILE__))

describe Array, 'task name conversions' do
  
  it 'should be able to deliver a task name' do
    ['build_essential'].to_task_name.should == 'build_essential'
  end
  
  it 'should join multiple elements together with a _ char' do
    ['gdb', 'gcc', 'g++'].to_task_name.should == 'gdb_gcc_g++'
  end
  
  it 'should use the task name of the underlying array element' do
    string = 'build-essential'
    string.should_receive(:to_task_name).and_return('build_essential')
    [string].to_task_name.should == 'build_essential'
  end
    
end

Version data entries

26 entries across 26 versions & 1 rubygems

Version Path
sprinkle-0.7.7 spec/sprinkle/extensions/array_spec.rb
sprinkle-0.7.6.2 spec/sprinkle/extensions/array_spec.rb
sprinkle-0.7.6.1 spec/sprinkle/extensions/array_spec.rb
sprinkle-0.7.6 spec/sprinkle/extensions/array_spec.rb
sprinkle-0.7.5 spec/sprinkle/extensions/array_spec.rb
sprinkle-0.7.4 spec/sprinkle/extensions/array_spec.rb
sprinkle-0.7.3 spec/sprinkle/extensions/array_spec.rb
sprinkle-0.7.2 spec/sprinkle/extensions/array_spec.rb
sprinkle-0.7.1.1 spec/sprinkle/extensions/array_spec.rb
sprinkle-0.7.1 spec/sprinkle/extensions/array_spec.rb
sprinkle-0.7 spec/sprinkle/extensions/array_spec.rb
sprinkle-0.6.2 spec/sprinkle/extensions/array_spec.rb
sprinkle-0.6.1.1 spec/sprinkle/extensions/array_spec.rb
sprinkle-0.6.1 spec/sprinkle/extensions/array_spec.rb
sprinkle-0.6.0 spec/sprinkle/extensions/array_spec.rb
sprinkle-0.5.2 spec/sprinkle/extensions/array_spec.rb
sprinkle-0.5.1.1 spec/sprinkle/extensions/array_spec.rb
sprinkle-0.5.1 spec/sprinkle/extensions/array_spec.rb
sprinkle-0.5.0 spec/sprinkle/extensions/array_spec.rb
sprinkle-0.5.0.rc1 spec/sprinkle/extensions/array_spec.rb