Sha256: 87038a3126f9b6d4e4d59c8a75f2258e900713e2bb0875cc38a20aea9719aba3

Contents?: true

Size: 789 Bytes

Versions: 2

Compression:

Stored size: 789 Bytes

Contents

# translate_spec.rb

require File.dirname(__FILE__) + '/spec_helper'

require 'meteo'
require 'json'
require 'awesome_print'

describe Meteo do
  describe "#quote" do
    it "gets the quote" do
      result = JSON.parse(subject.quote("plainsboro, nj", "imperial"))

      ap result

      expect(result['sys']['country']).to eq("United States of America")
    end
  end

  #it "should raise an error if one of parameters is missing" do
  #  expect { subject.meteo(nil, :ru) }.to raise_error
  #
  #  expect { subject.meteo(:en, nil) }.to raise_error
  #
  #  expect { subject.meteo(:en, :ru, nil) }.to raise_error
  #end
  #
  #it "should meteo test string from one language to another" do
  #  r = subject.meteo(:en, :ru, "hello world!")
  #  puts r
  #  r.size.should be > 0
  #end

end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
meteo-1.0.1 spec/meteo_spec.rb
meteo-1.0.0 spec/meteo_spec.rb