Sha256: 7f4d1aa7c2c4ba943142c6864b59a150ca666f57bb882e7581178f5a83176199

Contents?: true

Size: 508 Bytes

Versions: 4

Compression:

Stored size: 508 Bytes

Contents

require 'spec_helper'

def it_does_not_leak_view_context
  2.times do
    it "has an independent view context" do
      expect(StrongPresenter::ViewContext.current).not_to be :leaked
      StrongPresenter::ViewContext.current = :leaked
    end
  end
end

describe "A presenter spec", type: :presenter do
  it_does_not_leak_view_context
end

describe "A controller spec", type: :controller do
  it_does_not_leak_view_context
end

describe "A mailer spec", type: :mailer do
  it_does_not_leak_view_context
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
strong_presenter-0.2.2 spec/dummy/spec/presenters/view_context_spec.rb
strong_presenter-0.2.1 spec/dummy/spec/presenters/view_context_spec.rb
strong_presenter-0.2.0 spec/dummy/spec/presenters/view_context_spec.rb
strong_presenter-0.1.0 spec/dummy/spec/presenters/view_context_spec.rb