Sha256: b4f70ac9d9aa6fd804a8923097bc0fab2ae82a022546ed85a90ec247cb354465
Contents?: true
Size: 953 Bytes
Versions: 1
Compression:
Stored size: 953 Bytes
Contents
require "spec_helper" describe Namely::Configuration do before :each do unset_configuration! end after :each do set_configuration! end it "contains a subdomain and access_token when those have been set" do Namely.configure do |config| config.access_token = "my_token" config.subdomain = "my_subdomain" end expect(Namely.configuration.access_token).to eq "my_token" expect(Namely.configuration.subdomain).to eq "my_subdomain" end it "raises an error when the configuration block hasn't been run" do expect { Namely.configuration }.to raise_error Namely::ImproperlyConfiguredError end it "raises an error when variables haven't been set in the config" do Namely.configure do end expect { Namely.configuration.access_token }.to raise_error Namely::ImproperlyConfiguredError expect { Namely.configuration.subdomain }.to raise_error Namely::ImproperlyConfiguredError end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
namely-0.0.1 | spec/namely/configuration_spec.rb |