Class: RspecApiHelpers::Strategies::LoginHashStrategy
- Inherits:
-
Object
- Object
- RspecApiHelpers::Strategies::LoginHashStrategy
- Defined in:
- lib/rspec_api_helpers/strategies/login_hash_strategy.rb
Instance Method Summary collapse
-
#initialize ⇒ LoginHashStrategy
constructor
A new instance of LoginHashStrategy.
- #result(evaluation) ⇒ Object
Constructor Details
#initialize ⇒ LoginHashStrategy
Returns a new instance of LoginHashStrategy.
6 7 8 |
# File 'lib/rspec_api_helpers/strategies/login_hash_strategy.rb', line 6 def initialize @strategy = FactoryGirl.strategy_by_name(:create).new end |
Instance Method Details
#result(evaluation) ⇒ Object
12 13 14 15 16 17 18 19 20 21 |
# File 'lib/rspec_api_helpers/strategies/login_hash_strategy.rb', line 12 def result(evaluation) user = @strategy.result(evaluation) { 'user' => { 'email' => user.email, 'password' => user.password } } end |