Sha256: 62fe0ec194ae24aa69b65e31b6676e1dba5a8c3aa00b652b14d5bc4c5dbeb06b

Contents?: true

Size: 613 Bytes

Versions: 63

Compression:

Stored size: 613 Bytes

Contents

require File.dirname(__FILE__) + '/../../spec_helper'

describe String, '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 convert all - chars to _ in the task name' do
    'build-essential'.to_task_name.should == 'build_essential'
  end
  
  it 'should convert multiple - chars to _ chars in the task name' do
    'build--essential'.to_task_name.should == 'build__essential'
  end
  
  it 'should lowercase the task name' do
    'BUILD-ESSENTIAL'.to_task_name.should == 'build_essential'
  end
  
end

Version data entries

63 entries across 63 versions & 13 rubygems

Version Path
sprinkle-0.2.2 spec/sprinkle/extensions/string_spec.rb
sprinkle-0.2.1 spec/sprinkle/extensions/string_spec.rb
sprinkle-0.1.9 spec/sprinkle/extensions/string_spec.rb