Sha256: d8af4cb7c39b1aa3beea759f38957e300608da5265ecba0fd95acd2f56c26b1e
Contents?: true
Size: 523 Bytes
Versions: 13
Compression:
Stored size: 523 Bytes
Contents
require 'spec_helper' describe Virtus::InstanceMethods, '#to_hash' do subject { object.to_hash } class Model include Virtus attribute :name, String attribute :age, Integer attribute :email, String, :accessor => :private end let(:model) { Model } let(:object) { model.new(attributes) } let(:attributes) { { :name => 'john', :age => 28 } } it { should be_instance_of(Hash) } it 'returns attributes' do should eql(attributes) end end
Version data entries
13 entries across 13 versions & 2 rubygems