Sha256: afabac3a276dcd4c27629e62d964b0a2450f656cca925665aada909c4c966c69

Contents?: true

Size: 708 Bytes

Versions: 3

Compression:

Stored size: 708 Bytes

Contents

require 'spec_helper'

describe Weather::Forecast, :vcr do
  let(:response) { Weather.lookup 9848 }
  let(:forecast) { response.forecasts[0] }

  it 'should have an associated date' do
    expect(forecast.date).to be_a Time
  end

  it 'should contain high and low forecasts' do
    expect(forecast.high).to be_a Integer
    expect(forecast.low).to be_a Integer
  end

  it 'should contain the name of the day associated with the forecast' do
    expect(forecast.day).to be_a String
  end

  it 'should have a weather condition code' do
    expect(forecast.code).to be_a Integer
  end

  it 'should have a brief description of the forecasted conditions' do
    expect(forecast.text).to be_a String
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
weather-api-1.4.0 spec/lib/forecast_spec.rb
weather-api-1.3.0 spec/lib/forecast_spec.rb
weather-api-1.2.0 spec/lib/forecast_spec.rb