aboutsummaryrefslogtreecommitdiffstats
path: root/spec/controllers
diff options
context:
space:
mode:
Diffstat (limited to 'spec/controllers')
-rw-r--r--spec/controllers/refinery/blog/admin/comments_controller_spec.rb26
-rw-r--r--spec/controllers/refinery/blog/posts_controller_spec.rb4
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