Sha256: 4f01ada2781e9294387cdd63bb7c39ee273b6594f02186f446e10db31be2e341
Contents?: true
Size: 486 Bytes
Versions: 1
Compression:
Stored size: 486 Bytes
Contents
require 'test_helper' class DecoratorTest < MiniTest::Spec describe "Decorator" do it "exposes ::prepare" do if Representable::VERSION.split(".")[1] == "4" require 'roar/decorator' class SongRepresentation < Roar::Decorator include Roar::Representer::JSON property :name end SongRepresentation.prepare(OpenStruct.new(:name => "Not The Same")).to_hash.must_equal({"name"=>"Not The Same"}) end end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
roar-0.11.13 | test/decorator_test.rb |