aq1018/mongoid-history — pull request #111 by mrjlynch (2014-07-16 10:16:36+00:00)
Title: Adding 'reload' to trackables specs

When using mongoid 3.1.6, ruby 1.9.3 and Rails 3.2.16 I have found that ```Undo!``` and ```Redo!``` methods are not persisting when called directly on the object. For example:

```ruby
@book = Book.save(:name => 'name 1')
@book.update_attribtues(:name => 'name 2')
@book.update_attributes(:name => 'name 3')
@book.undo! @user, :from => 3, :to => 1 #=> true
@book.name #=> 'name 1'
@book.reload.name #=> 'name 3'
```

However when calling these methods on the history tracks, changes are being persisted. For example:

```ruby
@book = Book.save(:name => 'name 1')
@book.update_attribtues(:name => 'name 2')
@book.update_attributes(:name => 'name 3')
@track = @book.history_tracks.last
@track.undo! #=> true
@book.name #=> 'name 2'
@book.reload.name #=> 'name 2'
```

I am not sure why this is the case, though I had a look at the specs and discovered that ```reload``` was not being called on the objects before checking if ```undo!``` or ```redo!``` worked. I've decided to add that and the specs are now failing in my environment.