summaryrefslogtreecommitdiff
path: root/spec/ruby/library/stringio/pos_spec.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/ruby/library/stringio/pos_spec.rb')
-rw-r--r--spec/ruby/library/stringio/pos_spec.rb12
1 files changed, 10 insertions, 2 deletions
diff --git a/spec/ruby/library/stringio/pos_spec.rb b/spec/ruby/library/stringio/pos_spec.rb
index ba640f8c18..16f068b049 100644
--- a/spec/ruby/library/stringio/pos_spec.rb
+++ b/spec/ruby/library/stringio/pos_spec.rb
@@ -1,9 +1,17 @@
require_relative '../../spec_helper'
require_relative 'fixtures/classes'
-require_relative 'shared/tell'
describe "StringIO#pos" do
- it_behaves_like :stringio_tell, :pos
+ before :each do
+ @io = StringIOSpecs.build
+ end
+
+ it "returns the current byte offset" do
+ @io.getc
+ @io.pos.should == 1
+ @io.read(7)
+ @io.pos.should == 8
+ end
end
describe "StringIO#pos=" do