Sha256: dceffb2a62741546670c7904ed7653824b24af25eb12d46efd84e6894f28393d
Contents?: true
Size: 600 Bytes
Versions: 1
Compression:
Stored size: 600 Bytes
Contents
require 'test_helper_ar' class ArTest < Test::Unit::TestCase context 'AR' do should 'set the state' do o1 = Order.new assert_equal :open, o1.state o1.save! o2 = Order.find o1.id assert_equal 'open', o2[:state] assert_equal :open, o2.state end should 'make transition' do o = Order.new assert_equal :open, o.state o.deliver assert_equal :delivered, o.state o.save! o.reload o = Order.find(o.id) assert_equal :delivered, o.state end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
simplificator-fsm-0.3.5 | test/ar_test.rb |