Sha256: bac1e7713381b2e32dcb263dca880e548d4df0757ead24b4a2794cd87345e221
Contents?: true
Size: 690 Bytes
Versions: 7
Compression:
Stored size: 690 Bytes
Contents
require "spec_helper" require "ribose/actions/fetch" RSpec.describe "TestFetchAction" do describe ".fetch" do it "fetches a specific resource" do resource_id = 123_456_789 stub_ribose_space_fetch_api(resource_id) resource = Ribose::TestFetchAction.fetch(resource_id) expect(resource.id).not_to be_nil expect(resource.name).to eq("Work") end end def stub_ribose_space_fetch_api(resource_id) stub_api_response(:get, "spaces/#{resource_id}", filename: "space") end module Ribose class TestFetchAction < Ribose::Base include Ribose::Actions::Fetch private def resource "space" end end end end
Version data entries
7 entries across 7 versions & 1 rubygems