require 'spec_helper'
module WeatherReporter
  module HTTPService
    RSpec.describe Request do
      require 'pry'

      let(:data) {{city: "kathmandu"}}
      let(:config) {WeatherReporter::Configuration.new.read_file }
      let(:request) do
        WeatherReporter::HTTPService::Request.new({city: "kathmandu"}, config)
      end

      describe '.initialize' do
        it 'set data of the object from user' do
          expect(request.data).to eq(data)
        end
      end

      describe '#report' do
        it 'send data to the api' do
          expect(request.report).to eq(0)
        end
      end

    end
  end
end

require 'spec_helper'
module WeatherReporter
  module HTTPService
    RSpec.describe Request do
      require 'pry'

      let(:data) {{city: "kathmandu"}}
      let(:config) {WeatherReporter::Configuration.new }
      let(:request) do
        WeatherReporter::HTTPService::Request.new({city: "kathmandu"}, config)
      end

      describe '.initialize' do
        it 'set data of the object from user' do
          expect(request.data).to(eq(data))
        end

        it 'carries valid configuration' do
          expect(request.configuration).to(eq(config.read_file))
        end
      end

      describe '#report' do
        it 'gets reponce form the API call' do
          expect(request.report.class).to(eq(HTTParty::Response))
        end
      end

    end
  end
end

Test case for the Request class test for the valid configuration test for recieve responce for the api call
Test case for the Request class
test for the valid configuration
test for recieve responce for the api call
