require 'spec_helper' describe Saucy::Configuration do it "has layouts" do subject.layouts.should be_a(Saucy::Layouts) end it "has a manager_email_address" do subject.manager_email_address.should_not be_nil end it "has a support_email_address" do subject.support_email_address.should_not be_nil end it "has a trial_length of 30 days" do subject.trial_length.should == 30 end it "has an expiring_notice_on of 7 days" do subject.expiring_notice_on.should == 7 end it "has an unactivated_notice_on of 7 days" do subject.expiring_notice_on.should == 7 end it "has a nil merchant_account_id" do subject.merchant_account_id.should be_nil end it "can assign a manager email address" do old_address = subject.manager_email_address begin subject.manager_email_address = 'newsender@example.com' subject.manager_email_address.should == 'newsender@example.com' ensure subject.manager_email_address = old_address end end it "can assign a support email address" do old_address = subject.support_email_address begin subject.support_email_address = 'newsender@example.com' subject.support_email_address.should == 'newsender@example.com' ensure subject.support_email_address = old_address end end it "can assign a trial length" do old_length = subject.trial_length begin subject.trial_length = 14 subject.trial_length.should == 14 ensure subject.trial_length = old_length end end it "can assign an expiring_notice_on length" do old_length = subject.expiring_notice_on begin subject.expiring_notice_on = 14 subject.expiring_notice_on.should == 14 ensure subject.expiring_notice_on = old_length end end it "can assign a unactivated_notice_on length" do old_length = subject.unactivated_notice_on begin subject.unactivated_notice_on = 14 subject.unactivated_notice_on.should == 14 ensure subject.unactivated_notice_on = old_length end end end