From 0a8ccb1e99f575f808fc8b0c42729bf34936bd2f Mon Sep 17 00:00:00 2001 From: Kir Shatrov Date: Thu, 26 Dec 2013 18:25:56 +0100 Subject: [PATCH] New expectations rspec syntax in README --- README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index bb51ad0..737b40a 100644 --- a/README.md +++ b/README.md @@ -375,15 +375,15 @@ describe PostPolicy do permissions :create? do it "denies access if post is published" do - should_not permit(User.new(:admin => false), Post.new(:published => true)) + expect(subject).not_to permit(User.new(:admin => false), Post.new(:published => true)) end it "grants access if post is published and user is an admin" do - should permit(User.new(:admin => true), Post.new(:published => true)) + expect(subject).to permit(User.new(:admin => true), Post.new(:published => true)) end it "grants access if post is unpublished" do - should permit(User.new(:admin => false), Post.new(:published => false)) + expect(subject).to permit(User.new(:admin => false), Post.new(:published => false)) end end end