spec/mailstro/configuration_spec.rb in mailstro-0.0.7 vs spec/mailstro/configuration_spec.rb in mailstro-0.0.8
- old
+ new
@@ -12,6 +12,21 @@
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