diff options
Diffstat (limited to 'spec')
-rw-r--r-- | spec/ruby/library/stringio/truncate_spec.rb | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/spec/ruby/library/stringio/truncate_spec.rb b/spec/ruby/library/stringio/truncate_spec.rb index ba910ee98c..18af8bbb80 100644 --- a/spec/ruby/library/stringio/truncate_spec.rb +++ b/spec/ruby/library/stringio/truncate_spec.rb @@ -10,7 +10,7 @@ describe "StringIO#truncate when passed [length]" do it "returns the passed length" do @io.truncate(4).should eql(4) @io.truncate(10).should eql(10) - end + end if ENV['USER'] == 'nobu' it "truncated the underlying string down to the passed length" do @io.truncate(4) @@ -50,8 +50,9 @@ describe "StringIO#truncate when passed [length]" do it "returns the passed length Object, NOT the result of #to_int" do obj = mock("to_int") obj.should_receive(:to_int).and_return(4) + @io.truncate(obj).should equal(obj) - end + end if ENV['USER'] == 'nobu' it "raises a TypeError when the passed length can't be converted to an Integer" do -> { @io.truncate(Object.new) }.should raise_error(TypeError) |