Sha256: fb74fd84e1b9258030059a9f9ea504cffdc252cf3750c5c79e958aa7a11b8b54

Contents?: true

Size: 975 Bytes

Versions: 4

Compression:

Stored size: 975 Bytes

Contents

require_relative '../../../../lib/covid19/services/covid19_data'

RSpec.describe 'Covid19::Services::Covid19Data' do
  describe '.all_continents' do
    it 'returns all continents in JSON format' do
      result = Covid19::Services::Covid19Data.all_continents

      expect(result).not_to be_empty
    end
  end

  describe '.all_countries' do
    it 'returns all countries in JSON format' do
      result = Covid19::Services::Covid19Data.all_countries

      expect(result).not_to be_empty
    end 
  end

  describe '.continent' do
    it 'returns continent data in JSON format' do
      continent_name = 'South_America'
      result = Covid19::Services::Covid19Data.continent(continent_name)

      expect(result).not_to be_empty
    end
  end

  describe '.country' do
    it 'returns country data in JSON format' do
      country_name = 'Brazil'
      result = Covid19::Services::Covid19Data.country(country_name)

      expect(result).not_to be_empty
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
covid19-cli-0.5.0 spec/lib/covid19/services/covid19_data_spec.rb
covid19-cli-0.4.0 spec/lib/covid19/services/covid19_data_spec.rb
covid19-cli-0.3.0 spec/lib/covid19/services/covid19_data_spec.rb
covid19-cli-0.2.0 spec/lib/covid19/services/covid19_data_spec.rb