Commit 7b70d81c831d3e033993ef571e085bfee28ae590

Authored by Dmitriy Zaporozhets
1 parent 91a31d76

Speed up tests

Showing 2 changed files with 3 additions and 6 deletions   Show diff stats
spec/factories.rb
... ... @@ -17,16 +17,14 @@ FactoryGirl.define do
17 17 sequence(:username) { |n| "#{Faker::Internet.user_name}#{n}" }
18 18 password "123456"
19 19 password_confirmation { password }
  20 + confirmed_at { Time.now }
  21 + confirmation_token { nil }
20 22  
21 23 trait :admin do
22 24 admin true
23 25 end
24 26  
25 27 factory :admin, traits: [:admin]
26   -
27   - after :create do |u|
28   - u.confirm!
29   - end
30 28 end
31 29  
32 30 factory :project do
... ...
spec/support/test_env.rb
... ... @@ -86,9 +86,8 @@ module TestEnv
86 86 )
87 87  
88 88 ActivityObserver.any_instance.stub(
89   - current_user: double("current_user", id: 1)
  89 + current_user: double("current_user", id: 1)
90 90 )
91   -
92 91 end
93 92  
94 93 def clear_repo_dir(namespace, name)
... ...