Sha256: c789bb8d91173a88a3f3bd2ba6fc7b68a93db6b5d4b1fc3dd5b30347a4a673d2
Contents?: true
Size: 1.24 KB
Versions: 18
Compression:
Stored size: 1.24 KB
Contents
require 'spec_helper' describe Chargify::Base do it 'parses element names' do Chargify::Base.stub!(:name).and_return("Test::Namespace::ElementName") Chargify::Base.element_name.should eql('element_name') end context 'configuration changes' do before do @original_subdomain = Chargify.subdomain end # TODO: Because ActiveResource overloads the word "site" # It is difficult to support setting either the site or subdomain # after the class has already been configured and loaded # it "honors changes made after the first configuration" do # expect do # Chargify.configure do |c| # c.subdomain = "something-new" # end # end.to change { Chargify::Base.site.to_s }.to("https://something-new.chargify.com") # end it "honors the site over the subdomain if it is specified" do expect do Chargify.configure do |c| c.subdomain = "crazy-train" c.site = "http://test-site.chargify-test.com" c.api_key = "abc123" end end.to change { Chargify::Base.site.to_s }.to("http://test-site.chargify-test.com") end after do Chargify.configure do |c| c.subdomain = @original_subdomain end end end end
Version data entries
18 entries across 18 versions & 1 rubygems