diff --git a/spec/models/comment_spec.rb b/spec/models/comment_spec.rb index 11f56e0..428c39b 100644 --- a/spec/models/comment_spec.rb +++ b/spec/models/comment_spec.rb @@ -3,7 +3,7 @@ require 'spec_helper' describe Comment do it "factory should be valid" do - expect(FactoryGirl.build(:comment)).to be_valid + expect(build(:comment)).to be_valid end end diff --git a/spec/models/user_spec.rb b/spec/models/user_spec.rb index 88ee9a8..5e92bd3 100644 --- a/spec/models/user_spec.rb +++ b/spec/models/user_spec.rb @@ -92,7 +92,7 @@ describe User do before { user.save } context "when user doesn't have given token" do - let(:token) { FactoryGirl.attributes_for(:user_token)[:token] } + let(:token) { attributes_for(:user_token)[:token] } it 'returns created UserToken' do ut = user.add_user_token(token) @@ -102,7 +102,7 @@ describe User do end context "when user doesn't have given token" do - let(:existing_token) { FactoryGirl.create(:user_token, :user => user) } + let(:existing_token) { create(:user_token, :user => user) } let(:token) { existing_token.token } it 'returns existing UserToken' do diff --git a/spec/models/user_token_spec.rb b/spec/models/user_token_spec.rb index a106311..339f4fe 100644 --- a/spec/models/user_token_spec.rb +++ b/spec/models/user_token_spec.rb @@ -2,6 +2,6 @@ require 'spec_helper' describe UserToken do it "has valid factory" do - expect(FactoryGirl.build(:user_token)).to be_valid + expect(build(:user_token)).to be_valid end end