Sha256: 2b437cb09370f689afce305f786f666caa0e04f7ddb1dd40f461bbb35d19efa3
Contents?: true
Size: 525 Bytes
Versions: 21
Compression:
Stored size: 525 Bytes
Contents
require 'test_helper' class VirtualTest < MiniTest::Spec class CreditCardTwin < Disposable::Twin include Sync property :credit_card_number, virtual: true # no read, no write, it's virtual. end let (:twin) { CreditCardTwin.new(Object.new) } it { twin.credit_card_number = "123" twin.credit_card_number.must_equal "123" # this is still readable in the UI. twin.sync hash = {} twin.sync do |nested| hash = nested end hash.must_equal("credit_card_number"=> "123") } end
Version data entries
21 entries across 21 versions & 1 rubygems