Sha256: 9fd8a4766c455e6d439dca27d0012e3e233421a80282f599a9969c71caf7a50c

Contents?: true

Size: 466 Bytes

Versions: 19

Compression:

Stored size: 466 Bytes

Contents

require 'spec_helper'

describe RestModel do
  describe '#resource' do
    before do
      class Example < RestModel
        property :login
        property :name
        property :age, type: Float
      end
    end

    it "returns a hash with properties and its values" do
      example = Example.new(login: 'jackiechan2010', name: 'Jackie Chan', age: 45)
      example.resource.should == {login: 'jackiechan2010', name: 'Jackie Chan', age: 45}
    end
  end
end

Version data entries

19 entries across 19 versions & 1 rubygems

Version Path
rest_model-0.3.1 spec/unit/rest_model_spec.rb
rest_model-0.3.0 spec/unit/rest_model_spec.rb
rest_model-0.2.3 spec/unit/rest_model_spec.rb
rest_model-0.2.1 spec/unit/rest_model_spec.rb
rest_model-0.2.0 spec/unit/rest_model_spec.rb
rest_model-0.1.24 spec/unit/rest_model_spec.rb
rest_model-0.1.23 spec/unit/rest_model_spec.rb
rest_model-0.1.22 spec/unit/rest_model_spec.rb
rest_model-0.1.21 spec/unit/rest_model_spec.rb
rest_model-0.1.20 spec/unit/rest_model_spec.rb
rest_model-0.1.19 spec/unit/rest_model_spec.rb
rest_model-0.1.18 spec/unit/rest_model_spec.rb
rest_model-0.1.17 spec/unit/rest_model_spec.rb
rest_model-0.1.16 spec/unit/rest_model_spec.rb
rest_model-0.1.15 spec/unit/rest_model_spec.rb
rest_model-0.1.14 spec/unit/rest_model_spec.rb
rest_model-0.1.13 spec/unit/rest_model_spec.rb
rest_model-0.1.12 spec/unit/rest_model_spec.rb
rest_model-0.1.11 spec/unit/rest_model_spec.rb