test/callbacks_test.rb in disposable-0.4.3 vs test/callbacks_test.rb in disposable-0.4.4
- old
+ new
@@ -72,13 +72,13 @@
invokes.must_equal [twin]
end
# for collections.
it do
- album.songs << song1 = Song.new
+ album.songs << Song.new
album.songs << Song.create(title: "Run For Cover")
- album.songs << song2 = Song.new
+ album.songs << Song.new
invokes = []
Callback.new(twin.songs).on_create { |t| invokes << t }
invokes.must_equal []
@@ -142,13 +142,13 @@
invokes.must_equal [twin]
end
# for collections.
it do
- album.songs << song1 = Song.new
+ album.songs << Song.new
album.songs << Song.create(title: "Run For Cover")
- album.songs << song2 = Song.new
+ album.songs << Song.new
invokes = []
Callback.new(twin.songs).on_update { |t| invokes << t }
invokes.must_equal []
@@ -348,10 +348,10 @@
it do
ex_song = Song.create(title: "Run For Cover")
song = Song.new
album.songs = [ex_song, song]
- twin.songs.delete(deleted = twin.songs[0])
+ twin.songs.delete(twin.songs[0])
Callback.new(twin.songs).on_destroy { |t| invokes << t }
invokes.must_equal []
end
\ No newline at end of file