Sha256: 4ba6117395b1737937b97d566a584aaefa89ed0f81c2c0bdde995a2e8bd35caa

Contents?: true

Size: 553 Bytes

Versions: 19

Compression:

Stored size: 553 Bytes

Contents

require 'spec_helper'
require 'volt/models'

describe Volt::Persistors::Params do
  it 'should stay as params classes when used' do
    a = Volt::Model.new({}, persistor: Volt::Persistors::Params)
    expect(a._test.class).to eq(Volt::Model)

    expect(a._test._cool.persistor.class).to eq(Volt::Persistors::Params)

    a._items << { name: 'Test' }

    expect(a._items.persistor.class).to eq(Volt::Persistors::Params)
    expect(a._items[0].persistor.class).to eq(Volt::Persistors::Params)
    expect(a._items[0]._name.class).to eq(String)
  end
end

Version data entries

19 entries across 19 versions & 1 rubygems

Version Path
volt-0.8.27.beta6 spec/models/persistors/params_spec.rb
volt-0.8.27.beta5 spec/models/persistors/params_spec.rb
volt-0.8.27.beta4 spec/models/persistors/params_spec.rb
volt-0.8.27.beta3 spec/models/persistors/params_spec.rb
volt-0.8.27.beta2 spec/models/persistors/params_spec.rb
volt-0.8.27.beta1 spec/models/persistors/params_spec.rb
volt-0.8.26.beta1 spec/models/persistors/params_spec.rb
volt-0.8.26 spec/models/persistors/params_spec.rb
volt-0.8.24 spec/models/persistors/params_spec.rb
volt-0.8.23 spec/models/persistors/params_spec.rb
volt-0.8.22 spec/models/persistors/params_spec.rb
volt-0.8.22.beta2 spec/models/persistors/params_spec.rb
volt-0.8.22.beta1 spec/models/persistors/params_spec.rb
volt-0.8.21 spec/models/persistors/params_spec.rb
volt-0.8.20 spec/models/persistors/params_spec.rb
volt-0.8.19 spec/models/persistors/params_spec.rb
volt-0.8.18 spec/models/persistors/params_spec.rb
volt-0.8.17 spec/models/persistors/params_spec.rb
volt-0.8.16 spec/models/persistors/params_spec.rb