summaryrefslogtreecommitdiff
path: root/spec/ruby/library/stringio/sync_spec.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/ruby/library/stringio/sync_spec.rb')
-rw-r--r--spec/ruby/library/stringio/sync_spec.rb19
1 files changed, 19 insertions, 0 deletions
diff --git a/spec/ruby/library/stringio/sync_spec.rb b/spec/ruby/library/stringio/sync_spec.rb
new file mode 100644
index 0000000000..b662d7b7cc
--- /dev/null
+++ b/spec/ruby/library/stringio/sync_spec.rb
@@ -0,0 +1,19 @@
+require File.expand_path('../../../spec_helper', __FILE__)
+require File.expand_path('../fixtures/classes', __FILE__)
+
+describe "StringIO#sync" do
+ it "returns true" do
+ StringIO.new('').sync.should be_true
+ end
+end
+
+describe "StringIO#sync=" do
+ before :each do
+ @io = StringIO.new('')
+ end
+
+ it "does not change 'sync' status" do
+ @io.sync = false
+ @io.sync.should be_true
+ end
+end