Sha256: 8666738db858fe58eeab8ea0b467e8715ad43d49f56eaca27d7b8ff6ac92a8c4
Contents?: true
Size: 764 Bytes
Versions: 1
Compression:
Stored size: 764 Bytes
Contents
require "spec_helper" describe Paymill::Request::Base do context "#perform" do it "checks for an api key" do Paymill.stub(:api_key).and_return(nil) expect{ Paymill::Request::Base.new(nil).perform }.to raise_error Paymill::AuthenticationError end it "performs an https request" do Paymill.stub(:api_key).and_return("some key") connection = stub validator = stub Paymill::Request::Connection.stub(:new).and_return(connection) Paymill::Request::Validator.stub(:new).and_return(validator) connection.should_receive(:setup_https) connection.should_receive(:request) validator.should_receive(:validated_data_for) Paymill::Request::Base.new(nil).perform end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
paymill-0.4.0 | spec/paymill/request/base_spec.rb |