Skip to content
This repository has been archived by the owner on Jan 4, 2018. It is now read-only.

Commit

Permalink
Update ruby version related StringIO method lists.
Browse files Browse the repository at this point in the history
  • Loading branch information
asaaki committed Jan 22, 2012
1 parent 91cc8e8 commit 55316af
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 9 deletions.
2 changes: 2 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
rvm:
- 1.9.3
- 1.9.2
- 1.8.7
- jruby

branches:
only:
Expand Down
29 changes: 20 additions & 9 deletions spec/lib/base_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -182,24 +182,35 @@
describe "Instance Methods" do

describe "StringIO method wrapper" do
method_list = %w[
m18 = %w[
binmode bytes
chars close close_read close_write closed? closed_read? closed_write? codepoints
each each_byte each_char each_codepoint each_line
chars close close_read close_write closed? closed_read? closed_write?
each each_byte each_char each_line
eof eof?
external_encoding
fcntl fileno flush fsync
getbyte getc gets
internal_encoding isatty
isatty
length lineno lineno= lines
pid pos pos= print printf putc puts
read read_nonblock readbyte readchar readline readlines readpartial
read readbyte readchar readline readlines
reopen rewind
seek set_encoding size string string= sync sync= sysread syswrite
seek size string string= sync sync= sysread syswrite
tell truncate tty?
ungetbyte ungetc
write write_nonblock
ungetc
write
]
m19 = %w[
codepoints
each_codepoint
external_encoding
internal_encoding
read_nonblock
readpartial
set_encoding
ungetbyte
write_nonblock
]
method_list = RUBY_VERSION =~ /^1\.8\./ ? m18 : (m18 + m19)
method_list.each do |method_name|
it "- responds to ##{method_name}" do
Base.new.should respond_to(method_name)
Expand Down

0 comments on commit 55316af

Please sign in to comment.