spec/controllers/users_controller_spec.rb in draftsman-0.4.0 vs spec/controllers/users_controller_spec.rb in draftsman-0.5.0
- old
+ new
@@ -1,9 +1,9 @@
require 'spec_helper'
-describe UsersController, :type => :controller do
- let(:trashable) { Trashable.create!(:name => 'Bob') }
+describe UsersController, type: :controller do
+ let(:trashable) { Trashable.create!(name: 'Bob') }
describe 'create' do
before { post :create }
subject { Draftsman::Draft.last }
@@ -11,19 +11,19 @@
expect(subject.whodunnit).to eql 'A User'
end
end
describe 'update' do
- before { put :update, :id => trashable.id }
+ before { put :update, id: trashable.id }
subject { return Draftsman::Draft.last }
it 'records user name via `user_for_draftsman`' do
expect(subject.whodunnit).to eql 'A User'
end
end
describe 'destroy' do
- before { delete :destroy, :id => trashable.id }
+ before { delete :destroy, id: trashable.id }
subject { return Draftsman::Draft.last }
it 'records user name via `user_for_draftsman`' do
expect(subject.whodunnit).to eql 'A User'
end