controllers with rspec3 syntax

This commit is contained in:
Luciano Sousa
2015-01-09 14:04:02 -03:00
parent c96220ca76
commit bc73238c8f
50 changed files with 955 additions and 955 deletions

View File

@ -3,7 +3,7 @@ require 'spec_helper'
describe Admin::SiteSettingsController do
it "is a subclass of AdminController" do
(Admin::SiteSettingsController < Admin::AdminController).should == true
expect(Admin::SiteSettingsController < Admin::AdminController).to eq(true)
end
context 'while logged in as an admin' do
@ -14,12 +14,12 @@ describe Admin::SiteSettingsController do
context 'index' do
it 'returns success' do
xhr :get, :index
response.should be_success
expect(response).to be_success
end
it 'returns JSON' do
xhr :get, :index
::JSON.parse(response.body).should be_present
expect(::JSON.parse(response.body)).to be_present
end
end