Class: RspecApiHelpers::Strategies::HashStrategy

Inherits:
Object
  • Object
show all
Defined in:
lib/rspec_api_helpers/strategies/hash_strategy.rb

Instance Method Summary collapse

Constructor Details

#initializeHashStrategy

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