Sha256: 231c9a3fdd4bc638c929240a0fbffcd5af44a5fd1e226f1383935bb274c3b640

Contents?: true

Size: 516 Bytes

Versions: 2

Compression:

Stored size: 516 Bytes

Contents

# require 'test_helper'
# require 'cell/twin'

# class TwinTest < MiniTest::Spec
#   class SongCell < Cell::ViewModel
#     class Twin < Disposable::Twin
#       property :title
#       option :online?
#     end

#     include Cell::Twin
#     twin Twin

#     def show
#       "#{title} is #{online?}"
#     end

#     def title
#       super.downcase
#     end
#   end

#   let (:model) { OpenStruct.new(:title => "Kenny") }

#   it { SongCell.new( model, :online? => true).call.must_equal "kenny is true" }
# end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
cells-4.0.0 test/twin_test.rb
cells-4.0.0.rc1 test/twin_test.rb