aboutsummaryrefslogtreecommitdiffstats
path: root/spec/ruby/library/stringio/shared/tell.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/ruby/library/stringio/shared/tell.rb')
-rw-r--r--spec/ruby/library/stringio/shared/tell.rb12
1 files changed, 12 insertions, 0 deletions
diff --git a/spec/ruby/library/stringio/shared/tell.rb b/spec/ruby/library/stringio/shared/tell.rb
new file mode 100644
index 0000000000..852c51c192
--- /dev/null
+++ b/spec/ruby/library/stringio/shared/tell.rb
@@ -0,0 +1,12 @@
+describe :stringio_tell, shared: true do
+ before :each do
+ @io = StringIOSpecs.build
+ end
+
+ it "returns the current byte offset" do
+ @io.getc
+ @io.send(@method).should == 1
+ @io.read(7)
+ @io.send(@method).should == 8
+ end
+end