Sha256: e27573e2235191177a67b8e8942549cc89e76d60c910549c872d58bb3ff5b464

Contents?: true

Size: 568 Bytes

Versions: 1

Compression:

Stored size: 568 Bytes

Contents

require 'spec_helper'

require 'momm/web'
require 'rack/test'

describe Momm::Web do
  include Rack::Test::Methods

  def app
    Momm::Web
  end

  describe '/query' do
    it 'should response' do
      get '/query', money: 12, from: "GBP", to: "USD", date: "2014-3-10"

      expect(last_response).to be_ok
      expect(last_response.body).to eq("19.92")
    end
  end

  describe '/currencies' do
    it 'should response' do
      get '/currencies'

      expect(last_response).to be_ok

      expect(JSON.parse(last_response.body)).to be_a Array
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
momm-0.0.1 spec/momm/web_spec.rb