Sha256: 675f6a65e4c84cf4efc24323b21111b6f9ccabe14d82a7f47dcd5d2a12b1c9f5
Contents?: true
Size: 657 Bytes
Versions: 3
Compression:
Stored size: 657 Bytes
Contents
require File.join(File.dirname(__FILE__), 'CONFIG.rb') require "og" require "pp" require "test/unit" $DBG = true class Playlist property :name, String has_many :tracks end class Track property :name, String belongs_to Playlist def initialize(playlist) self.playlist = playlist end end class OgDeleteAll < Test::Unit::TestCase def setup Og.setup($og_config) end def pop @pl = Playlist.create 5.times do |i| Track.create(@pl) end end def test1 pop() @pl.tracks.delete_all assert(Track.all.empty?) pop() @pl.tracks.each { |obj| obj.delete } assert(Track.all.empty?) end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
og-0.24.0 | test/og/tc_delete_all.rb |
og-0.25.0 | test/og/tc_delete_all.rb |
og-0.26.0 | test/og/tc_delete_all.rb |