spec/mailstro/configuration_spec.rb in mailstro-0.0.2 vs spec/mailstro/configuration_spec.rb in mailstro-0.0.3
- old
+ new
@@ -4,6 +4,14 @@
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