root/lang/ruby/chokan/branches/citrus/spec/utils_spec.rb @ 6588

Revision 6588, 461 bytes (checked in by drry, 7 years ago)

lang/ruby/chokan/branches/citrus/spec/utils_spec.rb: added a spec for String#unindent.

  • Property svn:executable set to *
Line 
1#!/usr/bin/env ruby
2require File.dirname(__FILE__) + '/spec_helper.rb'
3
4include Citrus
5include Net::IRC
6include Constants
7
8describe String do
9        it "should define utility method for encoding" do
10                "".to_u8.should == ""
11                "".to_u16.should == ""
12                "".to_euc.should == ""
13                "".to_jis.should == ""
14                "".to_sjis.should == ""
15        end
16
17        it "should define utility method for encoding" do
18                <<-EOS.unindent.should == "one\n\ttwo\none\n"
19                        one
20                                two
21                        one
22                EOS
23        end
24end
25
Note: See TracBrowser for help on using the browser.