mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
Move spec/rubyspec to spec/ruby for consistency
* Other ruby implementations use the spec/ruby directory. [Misc #13792] [ruby-core:82287] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59979 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
75bfc6440d
commit
1d15d5f080
4370 changed files with 0 additions and 0 deletions
|
@ -0,0 +1,6 @@
|
|||
require File.expand_path('../../../../spec_helper', __FILE__)
|
||||
require 'csv'
|
||||
|
||||
describe "CSV::BasicWriter#close_on_terminate" do
|
||||
it "needs to be reviewed for spec completeness"
|
||||
end
|
6
spec/ruby/library/csv/basicwriter/initialize_spec.rb
Normal file
6
spec/ruby/library/csv/basicwriter/initialize_spec.rb
Normal file
|
@ -0,0 +1,6 @@
|
|||
require File.expand_path('../../../../spec_helper', __FILE__)
|
||||
require 'csv'
|
||||
|
||||
describe "CSV::BasicWriter#initialize" do
|
||||
it "needs to be reviewed for spec completeness"
|
||||
end
|
6
spec/ruby/library/csv/basicwriter/terminate_spec.rb
Normal file
6
spec/ruby/library/csv/basicwriter/terminate_spec.rb
Normal file
|
@ -0,0 +1,6 @@
|
|||
require File.expand_path('../../../../spec_helper', __FILE__)
|
||||
require 'csv'
|
||||
|
||||
describe "CSV::BasicWriter#terminate" do
|
||||
it "needs to be reviewed for spec completeness"
|
||||
end
|
6
spec/ruby/library/csv/cell/data_spec.rb
Normal file
6
spec/ruby/library/csv/cell/data_spec.rb
Normal file
|
@ -0,0 +1,6 @@
|
|||
require File.expand_path('../../../../spec_helper', __FILE__)
|
||||
require 'csv'
|
||||
|
||||
describe "CSV::Cell#data" do
|
||||
it "needs to be reviewed for spec completeness"
|
||||
end
|
6
spec/ruby/library/csv/cell/initialize_spec.rb
Normal file
6
spec/ruby/library/csv/cell/initialize_spec.rb
Normal file
|
@ -0,0 +1,6 @@
|
|||
require File.expand_path('../../../../spec_helper', __FILE__)
|
||||
require 'csv'
|
||||
|
||||
describe "CSV::Cell#initialize" do
|
||||
it "needs to be reviewed for spec completeness"
|
||||
end
|
1
spec/ruby/library/csv/fixtures/one_line.csv
Normal file
1
spec/ruby/library/csv/fixtures/one_line.csv
Normal file
|
@ -0,0 +1 @@
|
|||
1,2
|
|
6
spec/ruby/library/csv/foreach_spec.rb
Normal file
6
spec/ruby/library/csv/foreach_spec.rb
Normal file
|
@ -0,0 +1,6 @@
|
|||
require File.expand_path('../../../spec_helper', __FILE__)
|
||||
require 'csv'
|
||||
|
||||
describe "CSV.foreach" do
|
||||
it "needs to be reviewed for spec completeness"
|
||||
end
|
30
spec/ruby/library/csv/generate_line_spec.rb
Normal file
30
spec/ruby/library/csv/generate_line_spec.rb
Normal file
|
@ -0,0 +1,30 @@
|
|||
require File.expand_path('../../../spec_helper', __FILE__)
|
||||
require 'csv'
|
||||
|
||||
describe "CSV.generate_line" do
|
||||
|
||||
it "generates an empty string" do
|
||||
result = CSV.generate_line([])
|
||||
result.should == "\n"
|
||||
end
|
||||
|
||||
it "generates the string 'foo,bar'" do
|
||||
result = CSV.generate_line(["foo", "bar"])
|
||||
result.should == "foo,bar\n"
|
||||
end
|
||||
|
||||
it "generates the string 'foo;bar'" do
|
||||
result = CSV.generate_line(["foo", "bar"], col_sep: ?;)
|
||||
result.should == "foo;bar\n"
|
||||
end
|
||||
|
||||
it "generates the string 'foo,,bar'" do
|
||||
result = CSV.generate_line(["foo", nil, "bar"])
|
||||
result.should == "foo,,bar\n"
|
||||
end
|
||||
|
||||
it "generates the string 'foo;;bar'" do
|
||||
result = CSV.generate_line(["foo", nil, "bar"], col_sep: ?;)
|
||||
result.should == "foo;;bar\n"
|
||||
end
|
||||
end
|
6
spec/ruby/library/csv/generate_row_spec.rb
Normal file
6
spec/ruby/library/csv/generate_row_spec.rb
Normal file
|
@ -0,0 +1,6 @@
|
|||
require File.expand_path('../../../spec_helper', __FILE__)
|
||||
require 'csv'
|
||||
|
||||
describe "CSV.generate_row" do
|
||||
it "needs to be reviewed for spec completeness"
|
||||
end
|
32
spec/ruby/library/csv/generate_spec.rb
Normal file
32
spec/ruby/library/csv/generate_spec.rb
Normal file
|
@ -0,0 +1,32 @@
|
|||
require File.expand_path('../../../spec_helper', __FILE__)
|
||||
require 'csv'
|
||||
require 'tempfile'
|
||||
|
||||
describe "CSV.generate" do
|
||||
|
||||
it "returns CSV string" do
|
||||
csv_str = CSV.generate do |csv|
|
||||
csv.add_row [1, 2, 3]
|
||||
csv << [4, 5, 6]
|
||||
end
|
||||
csv_str.should == "1,2,3\n4,5,6\n"
|
||||
end
|
||||
|
||||
it "accepts a col separator" do
|
||||
csv_str = CSV.generate(col_sep: ";") do |csv|
|
||||
csv.add_row [1, 2, 3]
|
||||
csv << [4, 5, 6]
|
||||
end
|
||||
csv_str.should == "1;2;3\n4;5;6\n"
|
||||
end
|
||||
|
||||
it "appends and returns the argument itself" do
|
||||
str = ""
|
||||
csv_str = CSV.generate(str) do |csv|
|
||||
csv.add_row [1, 2, 3]
|
||||
csv << [4, 5, 6]
|
||||
end
|
||||
csv_str.object_id.should == str.object_id
|
||||
str.should == "1,2,3\n4,5,6\n"
|
||||
end
|
||||
end
|
6
spec/ruby/library/csv/iobuf/close_spec.rb
Normal file
6
spec/ruby/library/csv/iobuf/close_spec.rb
Normal file
|
@ -0,0 +1,6 @@
|
|||
require File.expand_path('../../../../spec_helper', __FILE__)
|
||||
require 'csv'
|
||||
|
||||
describe "CSV::IOBuf#close" do
|
||||
it "needs to be reviewed for spec completeness"
|
||||
end
|
6
spec/ruby/library/csv/iobuf/initialize_spec.rb
Normal file
6
spec/ruby/library/csv/iobuf/initialize_spec.rb
Normal file
|
@ -0,0 +1,6 @@
|
|||
require File.expand_path('../../../../spec_helper', __FILE__)
|
||||
require 'csv'
|
||||
|
||||
describe "CSV::IOBuf#initialize" do
|
||||
it "needs to be reviewed for spec completeness"
|
||||
end
|
6
spec/ruby/library/csv/iobuf/read_spec.rb
Normal file
6
spec/ruby/library/csv/iobuf/read_spec.rb
Normal file
|
@ -0,0 +1,6 @@
|
|||
require File.expand_path('../../../../spec_helper', __FILE__)
|
||||
require 'csv'
|
||||
|
||||
describe "CSV::IOBuf#read" do
|
||||
it "needs to be reviewed for spec completeness"
|
||||
end
|
6
spec/ruby/library/csv/iobuf/terminate_spec.rb
Normal file
6
spec/ruby/library/csv/iobuf/terminate_spec.rb
Normal file
|
@ -0,0 +1,6 @@
|
|||
require File.expand_path('../../../../spec_helper', __FILE__)
|
||||
require 'csv'
|
||||
|
||||
describe "CSV::IOBuf#terminate" do
|
||||
it "needs to be reviewed for spec completeness"
|
||||
end
|
|
@ -0,0 +1,6 @@
|
|||
require File.expand_path('../../../../spec_helper', __FILE__)
|
||||
require 'csv'
|
||||
|
||||
describe "CSV::IOReader#close_on_terminate" do
|
||||
it "needs to be reviewed for spec completeness"
|
||||
end
|
6
spec/ruby/library/csv/ioreader/get_row_spec.rb
Normal file
6
spec/ruby/library/csv/ioreader/get_row_spec.rb
Normal file
|
@ -0,0 +1,6 @@
|
|||
require File.expand_path('../../../../spec_helper', __FILE__)
|
||||
require 'csv'
|
||||
|
||||
describe "CSV::IOReader#get_row" do
|
||||
it "needs to be reviewed for spec completeness"
|
||||
end
|
6
spec/ruby/library/csv/ioreader/initialize_spec.rb
Normal file
6
spec/ruby/library/csv/ioreader/initialize_spec.rb
Normal file
|
@ -0,0 +1,6 @@
|
|||
require File.expand_path('../../../../spec_helper', __FILE__)
|
||||
require 'csv'
|
||||
|
||||
describe "CSV::IOReader#initialize" do
|
||||
it "needs to be reviewed for spec completeness"
|
||||
end
|
6
spec/ruby/library/csv/ioreader/terminate_spec.rb
Normal file
6
spec/ruby/library/csv/ioreader/terminate_spec.rb
Normal file
|
@ -0,0 +1,6 @@
|
|||
require File.expand_path('../../../../spec_helper', __FILE__)
|
||||
require 'csv'
|
||||
|
||||
describe "CSV::IOReader#terminate" do
|
||||
it "needs to be reviewed for spec completeness"
|
||||
end
|
6
spec/ruby/library/csv/open_spec.rb
Normal file
6
spec/ruby/library/csv/open_spec.rb
Normal file
|
@ -0,0 +1,6 @@
|
|||
require File.expand_path('../../../spec_helper', __FILE__)
|
||||
require 'csv'
|
||||
|
||||
describe "CSV.open" do
|
||||
it "needs to be reviewed for spec completeness"
|
||||
end
|
81
spec/ruby/library/csv/parse_spec.rb
Normal file
81
spec/ruby/library/csv/parse_spec.rb
Normal file
|
@ -0,0 +1,81 @@
|
|||
require File.expand_path('../../../spec_helper', __FILE__)
|
||||
require 'csv'
|
||||
|
||||
describe "CSV.parse" do
|
||||
|
||||
it "parses '' into []" do
|
||||
result = CSV.parse ''
|
||||
result.should be_kind_of(Array)
|
||||
result.should == []
|
||||
end
|
||||
|
||||
it "parses '\n' into [[]]" do
|
||||
result = CSV.parse "\n"
|
||||
result.should == [[]]
|
||||
end
|
||||
|
||||
it "parses 'foo' into [['foo']]" do
|
||||
result = CSV.parse 'foo'
|
||||
result.should == [['foo']]
|
||||
end
|
||||
|
||||
it "parses 'foo,bar,baz' into [['foo','bar','baz']]" do
|
||||
result = CSV.parse 'foo,bar,baz'
|
||||
result.should == [['foo','bar','baz']]
|
||||
end
|
||||
|
||||
it "parses 'foo,baz' into [[foo,nil,baz]]" do
|
||||
result = CSV.parse 'foo,,baz'
|
||||
result.should == [['foo',nil,'baz']]
|
||||
end
|
||||
|
||||
it "parses '\nfoo' into [[],['foo']]" do
|
||||
result = CSV.parse "\nfoo"
|
||||
result.should == [[],['foo']]
|
||||
end
|
||||
|
||||
it "parses 'foo\n' into [['foo']]" do
|
||||
result = CSV.parse "foo\n"
|
||||
result.should == [['foo']]
|
||||
end
|
||||
|
||||
it "parses 'foo\nbar' into [['foo'],['bar']]" do
|
||||
result = CSV.parse "foo\nbar"
|
||||
result.should == [['foo'],['bar']]
|
||||
end
|
||||
|
||||
it "parses 'foo,bar\nbaz,quz' into [['foo','bar'],['baz','quz']]" do
|
||||
result = CSV.parse "foo,bar\nbaz,quz"
|
||||
result.should == [['foo','bar'],['baz','quz']]
|
||||
end
|
||||
|
||||
it "parses 'foo,bar'\nbaz' into [['foo','bar'],['baz']]" do
|
||||
result = CSV.parse "foo,bar\nbaz"
|
||||
result.should == [['foo','bar'],['baz']]
|
||||
end
|
||||
|
||||
it "parses 'foo\nbar,baz' into [['foo'],['bar','baz']]" do
|
||||
result = CSV.parse "foo\nbar,baz"
|
||||
result.should == [['foo'],['bar','baz']]
|
||||
end
|
||||
|
||||
it "parses '\n\nbar' into [[],[],'bar']]" do
|
||||
result = CSV.parse "\n\nbar"
|
||||
result.should == [[],[],['bar']]
|
||||
end
|
||||
|
||||
it "parses 'foo' into [['foo']] with a separator of ;" do
|
||||
result = CSV.parse "foo", col_sep: ?;
|
||||
result.should == [['foo']]
|
||||
end
|
||||
|
||||
it "parses 'foo;bar' into [['foo','bar']] with a separator of ;" do
|
||||
result = CSV.parse "foo;bar", col_sep: ?;
|
||||
result.should == [['foo','bar']]
|
||||
end
|
||||
|
||||
it "parses 'foo;bar\nbaz;quz' into [['foo','bar'],['baz','quz']] with a separator of ;" do
|
||||
result = CSV.parse "foo;bar\nbaz;quz", col_sep: ?;
|
||||
result.should == [['foo','bar'],['baz','quz']]
|
||||
end
|
||||
end
|
6
spec/ruby/library/csv/read_spec.rb
Normal file
6
spec/ruby/library/csv/read_spec.rb
Normal file
|
@ -0,0 +1,6 @@
|
|||
require File.expand_path('../../../spec_helper', __FILE__)
|
||||
require 'csv'
|
||||
|
||||
describe "CSV.read" do
|
||||
it "needs to be reviewed for spec completeness"
|
||||
end
|
23
spec/ruby/library/csv/readlines_spec.rb
Normal file
23
spec/ruby/library/csv/readlines_spec.rb
Normal file
|
@ -0,0 +1,23 @@
|
|||
require File.expand_path('../../../spec_helper', __FILE__)
|
||||
require 'csv'
|
||||
|
||||
describe "CSV.readlines" do
|
||||
it "needs to be reviewed for spec completeness"
|
||||
end
|
||||
|
||||
describe "CSV#readlines" do
|
||||
it "returns an Array of Array containing each element in a one-line CSV file" do
|
||||
file = CSV.new "a, b, c"
|
||||
file.readlines.should == [["a", " b", " c"]]
|
||||
end
|
||||
|
||||
it "returns an Array of Arrays containing each element in a multi-line CSV file" do
|
||||
file = CSV.new "a, b, c\nd, e, f"
|
||||
file.readlines.should == [["a", " b", " c"], ["d", " e", " f"]]
|
||||
end
|
||||
|
||||
it "returns nil for a missing value" do
|
||||
file = CSV.new "a,, b, c"
|
||||
file.readlines.should == [["a", nil, " b", " c"]]
|
||||
end
|
||||
end
|
6
spec/ruby/library/csv/streambuf/add_buf_spec.rb
Normal file
6
spec/ruby/library/csv/streambuf/add_buf_spec.rb
Normal file
|
@ -0,0 +1,6 @@
|
|||
require File.expand_path('../../../../spec_helper', __FILE__)
|
||||
require 'csv'
|
||||
|
||||
describe "CSV::StreamBuf#add_buf" do
|
||||
it "needs to be reviewed for spec completeness"
|
||||
end
|
6
spec/ruby/library/csv/streambuf/buf_size_spec.rb
Normal file
6
spec/ruby/library/csv/streambuf/buf_size_spec.rb
Normal file
|
@ -0,0 +1,6 @@
|
|||
require File.expand_path('../../../../spec_helper', __FILE__)
|
||||
require 'csv'
|
||||
|
||||
describe "CSV::StreamBuf#buf_size" do
|
||||
it "needs to be reviewed for spec completeness"
|
||||
end
|
6
spec/ruby/library/csv/streambuf/drop_spec.rb
Normal file
6
spec/ruby/library/csv/streambuf/drop_spec.rb
Normal file
|
@ -0,0 +1,6 @@
|
|||
require File.expand_path('../../../../spec_helper', __FILE__)
|
||||
require 'csv'
|
||||
|
||||
describe "CSV::StreamBuf#drop" do
|
||||
it "needs to be reviewed for spec completeness"
|
||||
end
|
|
@ -0,0 +1,6 @@
|
|||
require File.expand_path('../../../../spec_helper', __FILE__)
|
||||
require 'csv'
|
||||
|
||||
describe "CSV::StreamBuf#[]" do
|
||||
it "needs to be reviewed for spec completeness"
|
||||
end
|
6
spec/ruby/library/csv/streambuf/get_spec.rb
Normal file
6
spec/ruby/library/csv/streambuf/get_spec.rb
Normal file
|
@ -0,0 +1,6 @@
|
|||
require File.expand_path('../../../../spec_helper', __FILE__)
|
||||
require 'csv'
|
||||
|
||||
describe "CSV::StreamBuf#get" do
|
||||
it "needs to be reviewed for spec completeness"
|
||||
end
|
6
spec/ruby/library/csv/streambuf/idx_is_eos_spec.rb
Normal file
6
spec/ruby/library/csv/streambuf/idx_is_eos_spec.rb
Normal file
|
@ -0,0 +1,6 @@
|
|||
require File.expand_path('../../../../spec_helper', __FILE__)
|
||||
require 'csv'
|
||||
|
||||
describe "CSV::StreamBuf#idx_is_eos?" do
|
||||
it "needs to be reviewed for spec completeness"
|
||||
end
|
6
spec/ruby/library/csv/streambuf/initialize_spec.rb
Normal file
6
spec/ruby/library/csv/streambuf/initialize_spec.rb
Normal file
|
@ -0,0 +1,6 @@
|
|||
require File.expand_path('../../../../spec_helper', __FILE__)
|
||||
require 'csv'
|
||||
|
||||
describe "CSV::StreamBuf#initialize" do
|
||||
it "needs to be reviewed for spec completeness"
|
||||
end
|
6
spec/ruby/library/csv/streambuf/is_eos_spec.rb
Normal file
6
spec/ruby/library/csv/streambuf/is_eos_spec.rb
Normal file
|
@ -0,0 +1,6 @@
|
|||
require File.expand_path('../../../../spec_helper', __FILE__)
|
||||
require 'csv'
|
||||
|
||||
describe "CSV::StreamBuf#is_eos?" do
|
||||
it "needs to be reviewed for spec completeness"
|
||||
end
|
6
spec/ruby/library/csv/streambuf/read_spec.rb
Normal file
6
spec/ruby/library/csv/streambuf/read_spec.rb
Normal file
|
@ -0,0 +1,6 @@
|
|||
require File.expand_path('../../../../spec_helper', __FILE__)
|
||||
require 'csv'
|
||||
|
||||
describe "CSV::StreamBuf#read" do
|
||||
it "needs to be reviewed for spec completeness"
|
||||
end
|
6
spec/ruby/library/csv/streambuf/rel_buf_spec.rb
Normal file
6
spec/ruby/library/csv/streambuf/rel_buf_spec.rb
Normal file
|
@ -0,0 +1,6 @@
|
|||
require File.expand_path('../../../../spec_helper', __FILE__)
|
||||
require 'csv'
|
||||
|
||||
describe "CSV::StreamBuf#rel_buf" do
|
||||
it "needs to be reviewed for spec completeness"
|
||||
end
|
6
spec/ruby/library/csv/streambuf/terminate_spec.rb
Normal file
6
spec/ruby/library/csv/streambuf/terminate_spec.rb
Normal file
|
@ -0,0 +1,6 @@
|
|||
require File.expand_path('../../../../spec_helper', __FILE__)
|
||||
require 'csv'
|
||||
|
||||
describe "CSV::StreamBuf#terminate" do
|
||||
it "needs to be reviewed for spec completeness"
|
||||
end
|
6
spec/ruby/library/csv/stringreader/get_row_spec.rb
Normal file
6
spec/ruby/library/csv/stringreader/get_row_spec.rb
Normal file
|
@ -0,0 +1,6 @@
|
|||
require File.expand_path('../../../../spec_helper', __FILE__)
|
||||
require 'csv'
|
||||
|
||||
describe "CSV::StringReader#get_row" do
|
||||
it "needs to be reviewed for spec completeness"
|
||||
end
|
6
spec/ruby/library/csv/stringreader/initialize_spec.rb
Normal file
6
spec/ruby/library/csv/stringreader/initialize_spec.rb
Normal file
|
@ -0,0 +1,6 @@
|
|||
require File.expand_path('../../../../spec_helper', __FILE__)
|
||||
require 'csv'
|
||||
|
||||
describe "CSV::StringReader#initialize" do
|
||||
it "needs to be reviewed for spec completeness"
|
||||
end
|
6
spec/ruby/library/csv/writer/add_row_spec.rb
Normal file
6
spec/ruby/library/csv/writer/add_row_spec.rb
Normal file
|
@ -0,0 +1,6 @@
|
|||
require File.expand_path('../../../../spec_helper', __FILE__)
|
||||
require 'csv'
|
||||
|
||||
describe "CSV::Writer#add_row" do
|
||||
it "needs to be reviewed for spec completeness"
|
||||
end
|
6
spec/ruby/library/csv/writer/append_spec.rb
Normal file
6
spec/ruby/library/csv/writer/append_spec.rb
Normal file
|
@ -0,0 +1,6 @@
|
|||
require File.expand_path('../../../../spec_helper', __FILE__)
|
||||
require 'csv'
|
||||
|
||||
describe "CSV::Writer#<<" do
|
||||
it "needs to be reviewed for spec completeness"
|
||||
end
|
6
spec/ruby/library/csv/writer/close_spec.rb
Normal file
6
spec/ruby/library/csv/writer/close_spec.rb
Normal file
|
@ -0,0 +1,6 @@
|
|||
require File.expand_path('../../../../spec_helper', __FILE__)
|
||||
require 'csv'
|
||||
|
||||
describe "CSV::Writer#close" do
|
||||
it "needs to be reviewed for spec completeness"
|
||||
end
|
6
spec/ruby/library/csv/writer/create_spec.rb
Normal file
6
spec/ruby/library/csv/writer/create_spec.rb
Normal file
|
@ -0,0 +1,6 @@
|
|||
require File.expand_path('../../../../spec_helper', __FILE__)
|
||||
require 'csv'
|
||||
|
||||
describe "CSV::Writer.create" do
|
||||
it "needs to be reviewed for spec completeness"
|
||||
end
|
6
spec/ruby/library/csv/writer/generate_spec.rb
Normal file
6
spec/ruby/library/csv/writer/generate_spec.rb
Normal file
|
@ -0,0 +1,6 @@
|
|||
require File.expand_path('../../../../spec_helper', __FILE__)
|
||||
require 'csv'
|
||||
|
||||
describe "CSV::Writer.generate" do
|
||||
it "needs to be reviewed for spec completeness"
|
||||
end
|
6
spec/ruby/library/csv/writer/initialize_spec.rb
Normal file
6
spec/ruby/library/csv/writer/initialize_spec.rb
Normal file
|
@ -0,0 +1,6 @@
|
|||
require File.expand_path('../../../../spec_helper', __FILE__)
|
||||
require 'csv'
|
||||
|
||||
describe "CSV::Writer#initialize" do
|
||||
it "needs to be reviewed for spec completeness"
|
||||
end
|
6
spec/ruby/library/csv/writer/terminate_spec.rb
Normal file
6
spec/ruby/library/csv/writer/terminate_spec.rb
Normal file
|
@ -0,0 +1,6 @@
|
|||
require File.expand_path('../../../../spec_helper', __FILE__)
|
||||
require 'csv'
|
||||
|
||||
describe "CSV::Writer#terminate" do
|
||||
it "needs to be reviewed for spec completeness"
|
||||
end
|
Loading…
Add table
Add a link
Reference in a new issue