diff options
author | Philip Arndt <git@arndt.io> | 2014-12-04 08:50:09 -0800 |
---|---|---|
committer | Philip Arndt <git@arndt.io> | 2014-12-04 13:44:21 -0800 |
commit | 494e38d2f14cd3549d10bafd382d1ab71e5266d1 (patch) | |
tree | fecd13cb9daa9edb96623f5d6357def1b7c8417c /spec/controllers/refinery/blog | |
parent | 1cec6e540daa2a5971290dc33bae77ed35f5429a (diff) | |
download | refinerycms-blog-494e38d2f14cd3549d10bafd382d1ab71e5266d1.tar.gz refinerycms-blog-494e38d2f14cd3549d10bafd382d1ab71e5266d1.tar.bz2 refinerycms-blog-494e38d2f14cd3549d10bafd382d1ab71e5266d1.zip |
Upgraded to rspec 3.x
Diffstat (limited to 'spec/controllers/refinery/blog')
-rw-r--r-- | spec/controllers/refinery/blog/admin/comments_controller_spec.rb | 26 | ||||
-rw-r--r-- | spec/controllers/refinery/blog/posts_controller_spec.rb | 4 |
2 files changed, 15 insertions, 15 deletions
diff --git a/spec/controllers/refinery/blog/admin/comments_controller_spec.rb b/spec/controllers/refinery/blog/admin/comments_controller_spec.rb index 5a439f1..4139c18 100644 --- a/spec/controllers/refinery/blog/admin/comments_controller_spec.rb +++ b/spec/controllers/refinery/blog/admin/comments_controller_spec.rb @@ -14,13 +14,13 @@ module Refinery it "succeeds" do get :index - response.should be_success - response.should render_template(:index) + expect(response).to be_success + expect(response).to render_template(:index) end it "assigns unmoderated comments" do get :index - assigns(:comments).first.should eq(comment) + expect(assigns(:comments).first).to eq(comment) end end @@ -29,13 +29,13 @@ module Refinery it "succeeds" do get :approved - response.should be_success - response.should render_template(:index) + expect(response).to be_success + expect(response).to render_template(:index) end it "assigns approved comments" do get :approved - assigns(:comments).first.should eq(comment) + expect(assigns(:comments).first).to eq(comment) end end @@ -44,12 +44,12 @@ module Refinery it "redirects on success" do post :approve, :id => comment.id - response.should be_redirect + expect(response).to be_redirect end it "approves the comment" do post :approve, :id => comment.id - Refinery::Blog::Comment.approved.count.should eq(1) + expect(Refinery::Blog::Comment.approved.count).to eq(1) end end @@ -58,13 +58,13 @@ module Refinery it "succeeds" do get :rejected - response.should be_success - response.should render_template(:index) + expect(response).to be_success + expect(response).to render_template(:index) end it "assigns rejected comments" do get :rejected - assigns(:comments).first.should eq(comment) + expect(assigns(:comments).first).to eq(comment) end end @@ -73,12 +73,12 @@ module Refinery it "redirects on success" do post :reject, :id => comment.id - response.should be_redirect + expect(response).to be_redirect end it "rejects the comment" do post :reject, :id => comment.id - Refinery::Blog::Comment.rejected.count.should eq(1) + expect(Refinery::Blog::Comment.rejected.count).to eq(1) end end end diff --git a/spec/controllers/refinery/blog/posts_controller_spec.rb b/spec/controllers/refinery/blog/posts_controller_spec.rb index 4b62d53..7265d64 100644 --- a/spec/controllers/refinery/blog/posts_controller_spec.rb +++ b/spec/controllers/refinery/blog/posts_controller_spec.rb @@ -11,12 +11,12 @@ module Refinery it "should not limit rss feed" do get :index, :format => :rss - assigns[:posts].size.should == 3 + expect(assigns[:posts].size).to eq(3) end it "should limit rss feed" do get :index, :format => :rss, :max_results => 2 - assigns[:posts].count.should == 2 + expect(assigns[:posts].count).to eq(2) end end end |