Sha256: 98cad2f2bfa13144ff3eaa00975a1d3ae24071503dc4fa57167d91fbec34230d

Contents?: true

Size: 930 Bytes

Versions: 26

Compression:

Stored size: 930 Bytes

Contents

# -*- encoding : utf-8 -*-
require File.expand_path(File.dirname(__FILE__)) + '/../helper'

class PrefixToolTest < Test::Unit::TestCase
  
  def test_action_description
    assert_equal "Prefix tracker names with text", Tracksperanto::Tool::Prefix.action_description
  end
  
  def test_prefix_supports_hash_init
    receiver = flexmock
    m = Tracksperanto::Tool::Prefix.new(receiver, :prefix => "foo")
    assert_equal "foo", m.prefix
  end
  
  def test_prefixes
    receiver = flexmock
    receiver.should_receive(:start_tracker_segment).once.with("Pre_Tracker")
    
    m = Tracksperanto::Tool::Prefix.new(receiver, :prefix => "Pre_")
    m.start_tracker_segment("Tracker")
  end

  def test_does_not_prefix_with_empty
    receiver = flexmock
    receiver.should_receive(:start_tracker_segment).once.with("Tracker")
    
    m = Tracksperanto::Tool::Prefix.new(receiver)
    m.start_tracker_segment("Tracker")
  end
  
end

Version data entries

26 entries across 26 versions & 1 rubygems

Version Path
tracksperanto-3.5.9 test/tools/test_prefix.rb
tracksperanto-3.5.8 test/tools/test_prefix.rb
tracksperanto-3.5.7 test/tools/test_prefix.rb
tracksperanto-3.5.6 test/tools/test_prefix.rb
tracksperanto-3.5.5 test/tools/test_prefix.rb
tracksperanto-3.5.4 test/tools/test_prefix.rb
tracksperanto-3.5.2 test/tools/test_prefix.rb
tracksperanto-3.5.1 test/tools/test_prefix.rb
tracksperanto-3.5.0 test/tools/test_prefix.rb
tracksperanto-3.4.1 test/tools/test_prefix.rb
tracksperanto-3.4.0 test/tools/test_prefix.rb
tracksperanto-3.3.13 test/tools/test_prefix.rb
tracksperanto-3.3.12 test/tools/test_prefix.rb
tracksperanto-3.3.11 test/tools/test_prefix.rb
tracksperanto-3.3.10 test/tools/test_prefix.rb
tracksperanto-3.3.9 test/tools/test_prefix.rb
tracksperanto-3.3.8 test/tools/test_prefix.rb
tracksperanto-3.3.7 test/tools/test_prefix.rb
tracksperanto-3.3.6 test/tools/test_prefix.rb
tracksperanto-3.3.0.pre test/tools/test_prefix.rb