Sha256: ac2a7bd7a2aabc40159bfbdec9514e09c04f702e4fdec6898f81beb47aaf4043

Contents?: true

Size: 346 Bytes

Versions: 3

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

3 entries across 3 versions & 1 rubygems

Version Path
reform-2.3.2 test/read_only_test.rb
reform-2.3.1 test/read_only_test.rb
reform-2.3.0.rc2 test/read_only_test.rb