Sha256: 4dd00ff061097868d89a4fb3a9af15a0b3e988aef320a6287c1bc96fba243017
Contents?: true
Size: 905 Bytes
Versions: 14
Compression:
Stored size: 905 Bytes
Contents
# Copyright (c) 2009 Michael Fellinger m.fellinger@gmail.com # All files in this distribution are subject to the terms of the Ruby license. require File.expand_path('../../../../lib/ramaze/spec/helper/snippets', __FILE__) describe "String#unindent" do it "should remove indentation" do %( hello how are you doing ).ui.should == \ %(hello how are you doing) end it 'should not break on a single line' do 'word'.unindent.should == 'word' end it 'should find the first line with indentation' do %( hi there bob).ui.should == \ %(hi there bob) end it 'should have destructive version' do str = %( 1\n 2\n 3) str.ui! str.should == %(1\n 2\n3) end it 'should use indentation from the last line if first line is not indented' do %(a{ abc }).ui.should == %(a{\n abc\n}) end end
Version data entries
14 entries across 14 versions & 3 rubygems