diff options
Diffstat (limited to 'spec/ruby/library')
-rw-r--r-- | spec/ruby/library/stringio/bytes_spec.rb | 12 | ||||
-rw-r--r-- | spec/ruby/library/stringio/chars_spec.rb | 12 | ||||
-rw-r--r-- | spec/ruby/library/stringio/codepoints_spec.rb | 9 | ||||
-rw-r--r-- | spec/ruby/library/stringio/each_char_spec.rb | 2 | ||||
-rw-r--r-- | spec/ruby/library/stringio/each_codepoint_spec.rb | 2 | ||||
-rw-r--r-- | spec/ruby/library/stringio/lines_spec.rb | 24 |
6 files changed, 35 insertions, 26 deletions
diff --git a/spec/ruby/library/stringio/bytes_spec.rb b/spec/ruby/library/stringio/bytes_spec.rb index 692fba997f..bf0d27615e 100644 --- a/spec/ruby/library/stringio/bytes_spec.rb +++ b/spec/ruby/library/stringio/bytes_spec.rb @@ -2,10 +2,12 @@ require_relative '../../spec_helper' require 'stringio' require_relative 'shared/each_byte' -describe "StringIO#bytes" do - it_behaves_like :stringio_each_byte, :bytes -end +ruby_version_is ''...'2.8' do + describe "StringIO#bytes" do + it_behaves_like :stringio_each_byte, :bytes + end -describe "StringIO#bytes when self is not readable" do - it_behaves_like :stringio_each_byte_not_readable, :bytes + describe "StringIO#bytes when self is not readable" do + it_behaves_like :stringio_each_byte_not_readable, :bytes + end end diff --git a/spec/ruby/library/stringio/chars_spec.rb b/spec/ruby/library/stringio/chars_spec.rb index 7dc55d4b37..e3879c2cff 100644 --- a/spec/ruby/library/stringio/chars_spec.rb +++ b/spec/ruby/library/stringio/chars_spec.rb @@ -2,10 +2,12 @@ require_relative '../../spec_helper' require 'stringio' require_relative 'shared/each_char' -describe "StringIO#chars" do - it_behaves_like :stringio_each_char, :chars -end +ruby_version_is ''...'2.8' do + describe "StringIO#chars" do + it_behaves_like :stringio_each_char, :chars + end -describe "StringIO#chars when self is not readable" do - it_behaves_like :stringio_each_char_not_readable, :chars + describe "StringIO#chars when self is not readable" do + it_behaves_like :stringio_each_char_not_readable, :chars + end end diff --git a/spec/ruby/library/stringio/codepoints_spec.rb b/spec/ruby/library/stringio/codepoints_spec.rb index cc2e5d1b5d..6ca395c964 100644 --- a/spec/ruby/library/stringio/codepoints_spec.rb +++ b/spec/ruby/library/stringio/codepoints_spec.rb @@ -3,7 +3,10 @@ require_relative '../../spec_helper' require_relative 'fixtures/classes' require_relative 'shared/codepoints' -# See redmine #1667 -describe "StringIO#codepoints" do - it_behaves_like :stringio_codepoints, :codepoints +ruby_version_is ''...'2.8' do + + # See redmine #1667 + describe "StringIO#codepoints" do + it_behaves_like :stringio_codepoints, :codepoints + end end diff --git a/spec/ruby/library/stringio/each_char_spec.rb b/spec/ruby/library/stringio/each_char_spec.rb index 7305162ee6..14b2f09a17 100644 --- a/spec/ruby/library/stringio/each_char_spec.rb +++ b/spec/ruby/library/stringio/each_char_spec.rb @@ -7,5 +7,5 @@ describe "StringIO#each_char" do end describe "StringIO#each_char when self is not readable" do - it_behaves_like :stringio_each_char_not_readable, :chars + it_behaves_like :stringio_each_char_not_readable, :each_char end diff --git a/spec/ruby/library/stringio/each_codepoint_spec.rb b/spec/ruby/library/stringio/each_codepoint_spec.rb index 85aa34d9d8..f18de22aad 100644 --- a/spec/ruby/library/stringio/each_codepoint_spec.rb +++ b/spec/ruby/library/stringio/each_codepoint_spec.rb @@ -5,5 +5,5 @@ require_relative 'shared/codepoints' # See redmine #1667 describe "StringIO#each_codepoint" do - it_behaves_like :stringio_codepoints, :codepoints + it_behaves_like :stringio_codepoints, :each_codepoint end diff --git a/spec/ruby/library/stringio/lines_spec.rb b/spec/ruby/library/stringio/lines_spec.rb index d9dd26c2e2..0a2ab0d817 100644 --- a/spec/ruby/library/stringio/lines_spec.rb +++ b/spec/ruby/library/stringio/lines_spec.rb @@ -2,18 +2,20 @@ require_relative '../../spec_helper' require 'stringio' require_relative 'shared/each' -describe "StringIO#lines when passed a separator" do - it_behaves_like :stringio_each_separator, :lines -end +ruby_version_is ''...'2.8' do + describe "StringIO#lines when passed a separator" do + it_behaves_like :stringio_each_separator, :lines + end -describe "StringIO#lines when passed no arguments" do - it_behaves_like :stringio_each_no_arguments, :lines -end + describe "StringIO#lines when passed no arguments" do + it_behaves_like :stringio_each_no_arguments, :lines + end -describe "StringIO#lines when self is not readable" do - it_behaves_like :stringio_each_not_readable, :lines -end + describe "StringIO#lines when self is not readable" do + it_behaves_like :stringio_each_not_readable, :lines + end -describe "StringIO#lines when passed chomp" do - it_behaves_like :stringio_each_chomp, :lines + describe "StringIO#lines when passed chomp" do + it_behaves_like :stringio_each_chomp, :lines + end end |