spec/td/client/import_api_spec.rb in td-client-0.8.79 vs spec/td/client/import_api_spec.rb in td-client-0.8.80
- old
+ new
@@ -23,11 +23,11 @@
end
stub_request(:put, "https://api-import.treasuredata.com/v3/table/import_with_id/db/table/unique_id/format").
with(:body => '12345').
to_return(:body => '{"elapsed_time":"1.23"}')
File.open(t.path) do |f|
- api.import('db', 'table', 'format', f, 5, 'unique_id').should == 1.23
+ expect(api.import('db', 'table', 'format', f, 5, 'unique_id')).to eq(1.23)
end
end
it 'runs without unique_id' do
t = Tempfile.new('import_api_spec')
@@ -36,11 +36,11 @@
end
stub_request(:put, "https://api-import.treasuredata.com/v3/table/import/db/table/format").
with(:body => '12345').
to_return(:body => '{"elapsed_time":"1.23"}')
File.open(t.path) do |f|
- api.import('db', 'table', 'format', f, 5).should == 1.23
+ expect(api.import('db', 'table', 'format', f, 5)).to eq(1.23)
end
end
it 'runs for old endpoint' do
t = Tempfile.new('import_api_spec')
@@ -49,10 +49,10 @@
end
stub_request(:put, "http://api-import.treasure-data.com/v3/table/import/db/table/format").
with(:body => '12345').
to_return(:body => '{"elapsed_time":"1.23"}')
File.open(t.path) do |f|
- api_old.import('db', 'table', 'format', f, 5).should == 1.23
+ expect(api_old.import('db', 'table', 'format', f, 5)).to eq(1.23)
end
end
it 'raises APIError' do
t = Tempfile.new('import_api_spec')