Sha256: 46184548eea3030b4bcf0a8e7cdd447cf03d3780d3b06e05920df6f53fda1db7

Contents?: true

Size: 352 Bytes

Versions: 1

Compression:

Stored size: 352 Bytes

Contents

require "test_helper"

class ReadonlyTest < MiniTest::Spec
  class SongForm < TestForm
    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

1 entries across 1 versions & 1 rubygems

Version Path
reform-2.3.3 test/read_only_test.rb