summaryrefslogtreecommitdiff
path: root/spec/support
diff options
context:
space:
mode:
Diffstat (limited to 'spec/support')
-rw-r--r--spec/support/login_helpers.rb2
-rw-r--r--spec/support/matchers.rb4
2 files changed, 3 insertions, 3 deletions
diff --git a/spec/support/login_helpers.rb b/spec/support/login_helpers.rb
index 769034e2286..4579c971d47 100644
--- a/spec/support/login_helpers.rb
+++ b/spec/support/login_helpers.rb
@@ -3,7 +3,7 @@ module LoginHelpers
#
# role - User role (e.g., :admin, :user)
def login_as(role)
- @user = Factory(role)
+ @user = create(role)
login_with(@user)
end
diff --git a/spec/support/matchers.rb b/spec/support/matchers.rb
index 809453c4a3b..29d16ecbac7 100644
--- a/spec/support/matchers.rb
+++ b/spec/support/matchers.rb
@@ -59,9 +59,9 @@ module UrlAccess
def emulate_user(user)
user = case user
- when :user then Factory(:user)
+ when :user then create(:user)
when :visitor then nil
- when :admin then Factory(:admin)
+ when :admin then create(:admin)
else user
end
login_with(user) if user