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

@ -5,13 +5,13 @@ describe Admin::AdminController do
context 'index' do
it 'needs you to be logged in' do
lambda { xhr :get, :index }.should raise_error(Discourse::NotLoggedIn)
expect { xhr :get, :index }.to raise_error(Discourse::NotLoggedIn)
end
it "raises an error if you aren't an admin" do
user = log_in
xhr :get, :index
response.should be_forbidden
expect(response).to be_forbidden
end
end