Sha256: 83e1c45e99b41c5882e63acbfd377678ed82590f2da1ce1cd958268850387b06

Contents?: true

Size: 809 Bytes

Versions: 2

Compression:

Stored size: 809 Bytes

Contents

require 'spec_helper'

describe Forecastr::DataContainer do
  let(:json) { JSON.parse(fixture('skopje.json').read) }
  let(:container) { Forecastr::DataContainer.new(json) }

  it 'contains json results' do
    expect(container.city).to eq "Opština Karpoš"
    expect(container.longitude).to eq 21.43
    expect(container.latitude).to eq 42
    expect(container.temperature).to eq 283.85
    expect(container.pressure).to eq 1021
    expect(container.humidity).to eq 70
    expect(container.min_temperature).to eq 280.15
    expect(container.max_temperature).to eq 285.93
    expect(container.clouds).to eq 0
    expect(container.wind_speed).to eq 1.16
    expect(container.wind_angle).to eq 128.501
    expect(container.sunrise).to eq '1395376499'
    expect(container.sunset).to eq '1395420461'
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
forecastr-0.1.5 spec/forecastr/data_container_spec.rb
forecastr-0.1.4 spec/forecastr/data_container_spec.rb