Sha256: 80841326e07f008c9c70b1e538b003e56bd72ab038b991adc48062dd8323deb8
Contents?: true
Size: 824 Bytes
Versions: 2
Compression:
Stored size: 824 Bytes
Contents
Given /^I have github instance$/ do @github = Github.new end Given /^I have "([^"]*)" instance$/ do |api_classes| constant = Object api_classes.split('::').each do |api_class| constant = constant.const_get api_class end @instance = constant.new end When /^I fetch "([^"]*)"$/ do |method| @response = @github.send(method.to_sym) end When /^I will have access to "([^"]*)" API$/ do |api| @response.class.to_s.should match api end When /^I am looking for "([^"]*)" with the following params:$/ do |method, table| table.hashes.each do |attributes| @method = method.to_sym @attributes = attributes end end When /^I make request$/ do @response = @instance.send @method, *@attributes.values end When /^I make request with hash params$/ do @response = @instance.send @method, @attributes end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
github_api-0.4.1 | features/step_definitions/github_api_steps.rb |
github_api-0.4.0 | features/step_definitions/github_api_steps.rb |