diff options
author | Philip Arndt <git@arndt.io> | 2014-12-05 11:53:18 -0800 |
---|---|---|
committer | Philip Arndt <git@arndt.io> | 2014-12-05 11:53:18 -0800 |
commit | 50c4b236da7120674589c254b05f8e78f7d7e8b4 (patch) | |
tree | e696de404d22f38f03a767c6376d7198e433fbca /spec/controllers/refinery/blog | |
parent | 1cec6e540daa2a5971290dc33bae77ed35f5429a (diff) | |
parent | c5d248b280ca975579d3a09ae8b7253afa2b0752 (diff) | |
download | refinerycms-blog-50c4b236da7120674589c254b05f8e78f7d7e8b4.tar.gz refinerycms-blog-50c4b236da7120674589c254b05f8e78f7d7e8b4.tar.bz2 refinerycms-blog-50c4b236da7120674589c254b05f8e78f7d7e8b4.zip |
Merge pull request #402 from refinery/rspec-3-x
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 |