title: RSpec test for pundit using expect syntax
body: <p>I'm trying to convert the following spec to new expect syntax, could anyone help?</p>
  
  <pre><code>describe PostPolicy do
    subject { PostPolicy }
  
    permissions :create? do
      it "denies access if post is published" do
        should_not permit(User.new(:admin =&gt; false), Post.new(:published =&gt; true))
      end
  
      it "grants access if post is published and user is an admin" do
        should permit(User.new(:admin =&gt; true), Post.new(:published =&gt; true))
      end
  
      it "grants access if post is unpublished" do
        should permit(User.new(:admin =&gt; false), Post.new(:published =&gt; false))
      end
    end
  end
  </code></pre>
  
  <p>I tried that, but it didn't work because <code>permit()</code> returns a matcher -- <code>RSpec::Matchers::DSL::Matcher</code>:</p>
  
  <pre><code>specify { expect(permit(@user, @post)).to be_true }
  </code></pre>