Sha256: 4dbc00c6cb52229d7e4c1552ef65fa0a7430b8daefbb464efe5c75bf82b430e6

Contents?: true

Size: 957 Bytes

Versions: 15

Compression:

Stored size: 957 Bytes

Contents

Then /it should return an? (\w+)$/ do |class_string|
  @response_from_httparty.should be_an_instance_of(class_string.constantize)
end

Then /the return value should match '(.*)'/ do |expected_text|
  @response_from_httparty.should eql(expected_text)
end

Then /it should return a Hash equaling:/ do |hash_table|
  @response_from_httparty.should be_an_instance_of(Hash)
  @response_from_httparty.keys.length.should eql(hash_table.rows.length)
  hash_table.hashes.each do |pair|
    key, value = pair["key"], pair["value"]
    @response_from_httparty.keys.should include(key)
    @response_from_httparty[key].should eql(value)
  end
end

Then /it should return a response with a (\d+) response code/ do |code|
  @response_from_httparty.code.should eql(code.to_i)
end

Then /it should raise an HTTParty::RedirectionTooDeep exception/ do
  @exception_from_httparty.should_not be_nil
  @exception_from_httparty.class.should eql(HTTParty::RedirectionTooDeep)
end

Version data entries

15 entries across 15 versions & 10 rubygems

Version Path
alexvollmer-httparty-0.4.3 features/steps/httparty_response_steps.rb
cluon-httparty-0.4.3 features/steps/httparty_response_steps.rb
dbalatero-httparty-0.4.4 features/steps/httparty_response_steps.rb
geetarista-httparty-0.4.5 features/steps/httparty_response_steps.rb
jnunemaker-httparty-0.4.2 features/steps/httparty_response_steps.rb
jnunemaker-httparty-0.4.3 features/steps/httparty_response_steps.rb
jnunemaker-httparty-0.4.4 features/steps/httparty_response_steps.rb
kerryb-httparty-0.4.3 features/steps/httparty_response_steps.rb
mfilej-httparty-0.4.3 features/steps/httparty_response_steps.rb
nullstyle-httparty-0.4.4 features/steps/httparty_response_steps.rb
kerryb-httparty-0.4.4 features/steps/httparty_response_steps.rb
yyyc514-httparty-0.4.4.2 features/steps/httparty_response_steps.rb
httparty-0.4.4 features/steps/httparty_response_steps.rb
httparty-0.4.2 features/steps/httparty_response_steps.rb
httparty-0.4.3 features/steps/httparty_response_steps.rb