Sha256: e133a3751f532e4a7115432f1be5b9595386e779762ebda68d4dddbb55b6d6ed

Contents?: true

Size: 488 Bytes

Versions: 20

Compression:

Stored size: 488 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

20 entries across 20 versions & 1 rubygems

Version Path
volt-0.7.20 spec/models/persistors/params_spec.rb
volt-0.7.19 spec/models/persistors/params_spec.rb
volt-0.7.18 spec/models/persistors/params_spec.rb
volt-0.7.17 spec/models/persistors/params_spec.rb
volt-0.7.16 spec/models/persistors/params_spec.rb
volt-0.7.15 spec/models/persistors/params_spec.rb
volt-0.7.14 spec/models/persistors/params_spec.rb
volt-0.7.13 spec/models/persistors/params_spec.rb
volt-0.7.12 spec/models/persistors/params_spec.rb
volt-0.7.10 spec/models/persistors/params_spec.rb
volt-0.7.9 spec/models/persistors/params_spec.rb
volt-0.7.8 spec/models/persistors/params_spec.rb
volt-0.7.7 spec/models/persistors/params_spec.rb
volt-0.7.6 spec/models/persistors/params_spec.rb
volt-0.7.5 spec/models/persistors/params_spec.rb
volt-0.7.4 spec/models/persistors/params_spec.rb
volt-0.7.3 spec/models/persistors/params_spec.rb
volt-0.7.2 spec/models/persistors/params_spec.rb
volt-0.7.1 spec/models/persistors/params_spec.rb
volt-0.7.0 spec/models/persistors/params_spec.rb