mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
Ignore rexml examples on ruby/spec
This commit is contained in:
parent
83240f315a
commit
e61cab3a36
Notes:
git
2020-01-12 12:29:06 +09:00
104 changed files with 1863 additions and 1551 deletions
|
@ -1,33 +1,36 @@
|
|||
require_relative '../../../spec_helper'
|
||||
require 'rexml/document'
|
||||
|
||||
describe "REXML::Text#write_with_substitution" do
|
||||
before :each do
|
||||
@t = REXML::Text.new("test")
|
||||
@f = tmp("rexml_spec")
|
||||
@file = File.open(@f, "w+")
|
||||
end
|
||||
ruby_version_is ''...'2.8' do
|
||||
require 'rexml/document'
|
||||
|
||||
after :each do
|
||||
@file.close
|
||||
rm_r @f
|
||||
end
|
||||
describe "REXML::Text#write_with_substitution" do
|
||||
before :each do
|
||||
@t = REXML::Text.new("test")
|
||||
@f = tmp("rexml_spec")
|
||||
@file = File.open(@f, "w+")
|
||||
end
|
||||
|
||||
it "writes out the input to a String" do
|
||||
s = ""
|
||||
@t.write_with_substitution(s, "some text")
|
||||
s.should == "some text"
|
||||
end
|
||||
after :each do
|
||||
@file.close
|
||||
rm_r @f
|
||||
end
|
||||
|
||||
it "writes out the input to an IO" do
|
||||
@t.write_with_substitution(@file, "some text")
|
||||
@file.rewind
|
||||
@file.gets.should == "some text"
|
||||
end
|
||||
it "writes out the input to a String" do
|
||||
s = ""
|
||||
@t.write_with_substitution(s, "some text")
|
||||
s.should == "some text"
|
||||
end
|
||||
|
||||
it "escapes characters" do
|
||||
@t.write_with_substitution(@file, "& < >")
|
||||
@file.rewind
|
||||
@file.gets.should == "& < >"
|
||||
it "writes out the input to an IO" do
|
||||
@t.write_with_substitution(@file, "some text")
|
||||
@file.rewind
|
||||
@file.gets.should == "some text"
|
||||
end
|
||||
|
||||
it "escapes characters" do
|
||||
@t.write_with_substitution(@file, "& < >")
|
||||
@file.rewind
|
||||
@file.gets.should == "& < >"
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue