Sha256: 30ab375bb6faf26e05cd6f60cef75617ddf67c938468801d224758c1970d95a6
Contents?: true
Size: 805 Bytes
Versions: 4
Compression:
Stored size: 805 Bytes
Contents
require 'spec_helper' describe Mailstro::Configuration do subject(:configuration) { Mailstro::Configuration.new } it "has a default api endpoint" do configuration.api_endpoint.should == "https://api.mailstroapp.com/v1" end describe "#validate!" do it "raises an error if an api_key is nil" do expect { subject.validate! }.to raise_error(Mailstro::Error::ConfigurationError) end end describe ".configure" do after do Mailstro.configuration = Mailstro::Configuration.new end it "allows you to pass a block to configure Mailstro" do Mailstro.configure do |config| config.api_key = 'x' config.api_endpoint = 'mailstro.dev' end Mailstro.configuration.api_endpoint.should == 'mailstro.dev' end end end
Version data entries
4 entries across 4 versions & 1 rubygems