Sha256: e26f0ea18e030084a5928a24c625d3f5bbea73836d90dd8092aac9e7f6280998

Contents?: true

Size: 346 Bytes

Versions: 1

Compression:

Stored size: 346 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.0.rc1 test/readonly_test.rb