Sha256: 99fca3d03e4fa78458ceae4e042ef0a03a7d65beb9f30920495ecde47685f6ad

Contents?: true

Size: 500 Bytes

Versions: 31

Compression:

Stored size: 500 Bytes

Contents

require 'volt/models'

describe Persistors::Params do
  it "should stay as params classes when used" do
    a = Model.new({}, persistor: Persistors::Params)
    expect(a._test.class).to eq(Model)
    
    expect(a._test._cool.persistor.class).to eq(Persistors::Params)
    
    a._items << {_name: 'Test'}
    
    expect(a._items.persistor.class).to eq(Persistors::Params)
    expect(a._items[0].persistor.class).to eq(Persistors::Params)
    expect(a._items[0]._name.class).to eq(String)
  end
end

Version data entries

31 entries across 31 versions & 1 rubygems

Version Path
volt-0.6.5 spec/models/persistors/params_spec.rb
volt-0.6.4 spec/models/persistors/params_spec.rb
volt-0.6.3 spec/models/persistors/params_spec.rb
volt-0.6.2 spec/models/persistors/params_spec.rb
volt-0.6.1 spec/models/persistors/params_spec.rb
volt-0.6.0 spec/models/persistors/params_spec.rb
volt-0.5.18 spec/models/persistors/params_spec.rb
volt-0.5.17 spec/models/persistors/params_spec.rb
volt-0.5.16 spec/models/persistors/params_spec.rb
volt-0.5.15 spec/models/persistors/params_spec.rb
volt-0.5.14 spec/models/persistors/params_spec.rb
volt-0.5.13 spec/models/persistors/params_spec.rb
volt-0.5.12 spec/models/persistors/params_spec.rb
volt-0.5.11 spec/models/persistors/params_spec.rb
volt-0.5.10 spec/models/persistors/params_spec.rb
volt-0.5.9 spec/models/persistors/params_spec.rb
volt-0.5.8 spec/models/persistors/params_spec.rb
volt-0.5.7 spec/models/persistors/params_spec.rb
volt-0.5.6 spec/models/persistors/params_spec.rb
volt-0.5.4 spec/models/persistors/params_spec.rb