Sha256: 53c567c59eadba73b6c3800b2b0280845d404b3b9843f7b2230bbf6c97b319bb

Contents?: true

Size: 350 Bytes

Versions: 22

Compression:

Stored size: 350 Bytes

Contents

require "test_helper"

class ReadonlyTest < MiniTest::Spec
  class SongForm < Reform::Form
    property :artist
    property :title, writeable: false
    # TODO: what to do with virtual values?
  end

  let (:form) { SongForm.new(OpenStruct.new) }

  it { form.readonly?(:artist).must_equal false }
  it { form.readonly?(:title).must_equal true }
end

Version data entries

22 entries across 22 versions & 1 rubygems

Version Path
reform-2.2.4 test/readonly_test.rb
reform-2.2.3 test/readonly_test.rb
reform-2.2.2 test/readonly_test.rb
reform-2.2.1 test/readonly_test.rb
reform-2.2.0 test/readonly_test.rb
reform-2.2.0.rc1 test/readonly_test.rb
reform-2.1.0 test/readonly_test.rb
reform-2.1.0.rc1 test/readonly_test.rb
reform-2.0.5 test/readonly_test.rb
reform-2.0.4 test/readonly_test.rb
reform-2.0.3 test/readonly_test.rb
reform-2.0.2 test/readonly_test.rb
reform-2.0.1 test/readonly_test.rb
reform-2.0.0 test/readonly_test.rb
reform-2.0.0.rc3 test/readonly_test.rb
reform-2.0.0.rc2 test/readonly_test.rb
reform-2.0.0.rc1 test/readonly_test.rb
reform-2.0.0.beta2 test/readonly_test.rb
reform-2.0.0.beta1 test/readonly_test.rb
reform-1.2.6 test/readonly_test.rb