require File.expand_path(File.dirname(__FILE__) + "/../spec_helper")

describe Cardflex::Gateway do
  it 'should accept a hash or a Configuration' do
    config = Cardflex::Configuration.new({ :api_key => '123' })
    config_hash = { :api_key => '123' }

    expect(Cardflex::Gateway.new(config).config.api_key).to eq '123'
    expect(Cardflex::Gateway.new(config_hash).config.api_key).to eq '123'
  end
end