Sha256: 6c40923f758f84ad63278a872b5f4ef4c406d0aed4a74c100594f6b586b68314
Contents?: true
Size: 1.03 KB
Versions: 6
Compression:
Stored size: 1.03 KB
Contents
require_relative "../../../test_helper" module Troo module External describe BoardAdaptor do let(:described_class) { BoardAdaptor } let(:resource) { OpenStruct.new({ id: "526d8e130a14a9d846001d96", name: "My Test Board", description: "A very brief description...", closed: false, }) } describe "#initialize" do subject { described_class.new(resource) } it "assigns the resource to an instance variable" do subject.instance_variable_get("@resource").must_equal(resource) end end describe "#adapted" do subject { described_class.adapt(resource) } it "returns an adapted resource suitable for local persistence" do subject.must_equal({ external_board_id: "526d8e130a14a9d846001d96", name: "My Test Board", description: "A very brief description...", closed: "false", }) end end end end end
Version data entries
6 entries across 6 versions & 1 rubygems