Sha256: 98e4a7a5b38aa7f18966783b8e4ad7ea9aaed967b171ebce4d68030abf6ad978
Contents?: true
Size: 435 Bytes
Versions: 4
Compression:
Stored size: 435 Bytes
Contents
require 'printfection' module Printfection describe Product, "properties" do let(:json) do JSON.parse <<-JSON { "id": 123, "name": "American Apparel 50/50 T-Shirt" } JSON end it "gives access to JSON properties" do product = Product.new(json) expect(product.id).to eql 123 expect(product.name).to eql "American Apparel 50/50 T-Shirt" end end end
Version data entries
4 entries across 4 versions & 1 rubygems
Version | Path |
---|---|
printfection-1.0.3 | spec/product_spec.rb |
printfection-1.0.2 | spec/product_spec.rb |
printfection-1.0.1 | spec/product_spec.rb |
printfection-1.0.0 | spec/product_spec.rb |