Module: Refinery::Testing::FeatureMacros::Authentication
- Defined in:
- lib/refinery/testing/feature_macros/authentication.rb
Instance Method Summary collapse
- #login_refinery_superuser ⇒ Object
- #login_refinery_translator ⇒ Object
- #login_refinery_user ⇒ Object
- #refinery_login_with(factory) ⇒ Object
Instance Method Details
#login_refinery_superuser ⇒ Object
18 19 20 21 |
# File 'lib/refinery/testing/feature_macros/authentication.rb', line 18 def login_refinery_superuser Refinery.deprecate(:login_refinery_superuser, :when => '2.2', :replacement => 'refinery_login_with :refinery_superuser') refinery_login_with(:refinery_superuser) end |
#login_refinery_translator ⇒ Object
23 24 25 26 |
# File 'lib/refinery/testing/feature_macros/authentication.rb', line 23 def login_refinery_translator Refinery.deprecate(:login_refinery_translator, :when => '2.2', :replacement => 'refinery_login_with :refinery_translator') refinery_login_with(:refinery_translator) end |
#login_refinery_user ⇒ Object
13 14 15 16 |
# File 'lib/refinery/testing/feature_macros/authentication.rb', line 13 def login_refinery_user Refinery.deprecate(:login_refinery_user, :when => '2.2', :replacement => 'refinery_login_with :refinery_user') refinery_login_with(:refinery_user) end |
#refinery_login_with(factory) ⇒ Object
5 6 7 8 9 10 11 |
# File 'lib/refinery/testing/feature_macros/authentication.rb', line 5 def refinery_login_with(factory) let!(:logged_in_user) { FactoryGirl.create(factory) } before do login_as logged_in_user, :scope => :refinery_user end end |