Sha256: cd95f7f65f2e993281a9dcec65c7a6d7758aff0b0272ece540a4de536371528f

Contents?: true

Size: 784 Bytes

Versions: 9

Compression:

Stored size: 784 Bytes

Contents

require 'pione/test-helper'

TEXT = []
EXPECT = []

# case 0
TEXT.push <<S
  1st line
  2nd line
  3rd line
S

EXPECT.push <<S
1st line
2nd line
3rd line
S

# case 1
TEXT.push <<S
  1st line
    2nd line
      3rd line
S

EXPECT.push <<S
1st line
  2nd line
    3rd line
S

# case 2
TEXT.push <<S
    1st line
  2nd line
3rd line
S

EXPECT.push <<S
1st line
2nd line
3rd line
S

# case 3
TEXT.push <<S
    1st line
  2nd line
    3rd line
S

EXPECT.push <<S
1st line
2nd line
3rd line
S

# case 4
TEXT.push <<S
    1st line
    2nd line
  3rd line
S

EXPECT.push <<S
1st line
2nd line
3rd line
S

describe "Pione::Util::Indentaion" do
  TEXT.size.times do |i|
    it 'should cut indendations: case %s' % i do
      Util::Indentation.cut(TEXT[i]).should == EXPECT[i]
    end
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
pione-0.5.0 test/util/spec_indentation.rb
pione-0.5.0.alpha.2 test/util/spec_indentation.rb
pione-0.5.0.alpha.1 test/util/spec_indentation.rb
pione-0.4.2 test/util/spec_indentation.rb
pione-0.4.1 test/util/spec_indentation.rb
pione-0.4.0 test/util/spec_indentation.rb
pione-0.3.2 test/util/spec_indentation.rb
pione-0.3.1 test/util/spec_indentation.rb
pione-0.3.0 test/util/spec_indentation.rb