collectiveidea / json_spec

Easily handle JSON in RSpec and Cucumber
rubygems.org/gems/json_spec
MIT License
919 stars 114 forks source link

Cucumber testing -> create method "last_json" where? #49

Open jongillies opened 11 years ago

jongillies commented 11 years ago

Greetings, In the README.md it says to:

"You also need to define a last_json method"

Where would you define this method?

Thanks, Jon.

morozgrafix commented 9 years ago

Not sure if this helps. This is in my <cucumber_project>/features/support/json_spec.rb:

module JSONSpecInterface
    def last_json
        #last_response.body contains raw JSON from API response that my http client gets
        last_response.body
    end
end

World(JSONSpecInterface)