Fix rspec 2.99 deprecations
This commit is contained in:
parent
b70071a7c3
commit
fae21e87d4
@ -19,7 +19,7 @@ describe API::PlaylistsController do
|
||||
end
|
||||
|
||||
it 'lists all playlists' do
|
||||
expect(do_get).to have(2).items
|
||||
expect(do_get.size).to eq 2
|
||||
end
|
||||
|
||||
it 'lists playlists with their id' do
|
||||
|
@ -19,7 +19,7 @@ describe API::TracksController do
|
||||
end
|
||||
|
||||
it 'lists all tracks' do
|
||||
expect(do_get).to have(2).items
|
||||
expect(do_get.size).to eq 2
|
||||
end
|
||||
|
||||
it 'lists tracks with their id' do
|
||||
|
@ -1,8 +1,7 @@
|
||||
require 'spec_helper'
|
||||
|
||||
describe User do
|
||||
subject { user }
|
||||
let(:user) { FactoryGirl.build(:user) }
|
||||
subject(:user) { FactoryGirl.build(:user) }
|
||||
|
||||
it { should be_valid }
|
||||
it { should have_many :playlists }
|
||||
@ -12,11 +11,14 @@ describe User do
|
||||
|
||||
context 'when a user with the same email address already exists' do
|
||||
let(:old_user) { FactoryGirl.create(:user, email: 'unique@example.net') }
|
||||
subject { FactoryGirl.build(:user, email: old_user.email) }
|
||||
subject(:user) { FactoryGirl.build(:user, email: old_user.email) }
|
||||
|
||||
it { should_not be_valid }
|
||||
|
||||
it { should have(1).error_on(:email) }
|
||||
it 'has an error on email attribute' do
|
||||
user.valid?
|
||||
expect(user.errors[:email].size).to eq 1
|
||||
end
|
||||
end
|
||||
|
||||
context 'when password_confirmation does not match password' do
|
||||
|
Loading…
x
Reference in New Issue
Block a user