Sha256: a76871cb1d4a5f795f4a32d6047d290af811d907a3d457dfcdd659a0896e20f9

Contents?: true

Size: 626 Bytes

Versions: 1

Compression:

Stored size: 626 Bytes

Contents

require_relative '../../../../test_helper'

module Troo
  module Remote
    describe Resource do
      let(:described_class) { Resource }
      let(:json) { "{\"some_key\":\"some_value\"}" }

      describe '#initialize' do
        subject { described_class.new(json) }

        it 'assigns the JSON to an instance variable' do
          subject.instance_variable_get('@json').must_equal(json)
        end
      end

      describe '.create' do
        subject { described_class.create(json) }

        it 'returns the resource' do
          subject.must_be_instance_of described_class
        end
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
troo-0.0.8 test/lib/troo/models/remote/resource_test.rb