Sha256: 36d741b9674bccf906f765f1b2bc5864a1c75f4afe27d9dc38670a74650aa227

Contents?: true

Size: 549 Bytes

Versions: 1

Compression:

Stored size: 549 Bytes

Contents

require 'spec_helper'

describe "Articles" do
  let(:valid_params) { { :article => { :title => 'Doh', :content => Faker::Lorem.sentence } } }

  context "versioning disabled" do
    specify { PaperTrail.enabled?.should be_false }

    it "should not create a version" do
      expect { post articles_path(valid_params) }.to_not change(PaperTrail::Version, :count)
    end

    it "should not leak the state of the `PaperTrail.enabled_for_controlller?` into the next test" do
      PaperTrail.enabled_for_controller?.should be_true
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
paper_trail-3.0.0.rc2 spec/requests/articles_spec.rb