require 'spec_helper' describe Mailstro::Configuration do subject(:configuration) { Mailstro::Configuration.new } it "has a default endpoint" do configuration.endpoint.should =~ /mailstro/ end describe "#validate!" do it "raises an error if an api_key is nil" do expect { subject.validate! }.to raise_error(Mailstro::ConfigurationError) end end end