Sha256: edd1cae53ac240d02c51a1d22cd95bf206e92cf5e7af9e861ce4f2dbf6592bd4

Contents?: true

Size: 497 Bytes

Versions: 5

Compression:

Stored size: 497 Bytes

Contents

require 'spec_helper'

# This model is in the test suite soley for the purpose of testing ActiveRecord::Enum,
# which is available in ActiveRecord4+ only
describe PostWithStatus do
  if defined?(ActiveRecord::Enum)
    with_versioning do
      let(:post) { PostWithStatus.create!(:status => 'draft') }

      it "should stash the enum value properly in versions" do
        post.published!
        post.archived!
        post.previous_version.published?.should == true
      end
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
paper_trail-3.0.9 spec/models/post_with_status_spec.rb
paper_trail-3.0.8 spec/models/post_with_status_spec.rb
paper_trail-3.0.7 spec/models/post_with_status_spec.rb
paper_trail-3.0.6 spec/models/post_with_status_spec.rb
paper_trail-3.0.5 spec/models/post_with_status_spec.rb