Class: RspecApiHelpers::Strategies::HashStrategy
- Inherits:
-
Object
- Object
- RspecApiHelpers::Strategies::HashStrategy
- Defined in:
- lib/rspec_api_helpers/strategies/hash_strategy.rb
Instance Method Summary collapse
-
#initialize ⇒ HashStrategy
constructor
A new instance of HashStrategy.
- #result(evaluation) ⇒ Object
Constructor Details
#initialize ⇒ HashStrategy
Returns a new instance of HashStrategy.
7 8 9 |
# File 'lib/rspec_api_helpers/strategies/hash_strategy.rb', line 7 def initialize @strategy = FactoryGirl.strategy_by_name(:build).new end |
Instance Method Details
#result(evaluation) ⇒ Object
13 14 15 |
# File 'lib/rspec_api_helpers/strategies/hash_strategy.rb', line 13 def result(evaluation) JSON.parse @strategy.result(evaluation).to_json end |