```ruby
require 'spec_helper'

describe Hubstats
  context ".config" do
    it "creates a new config object" do
      expect(Hubstats::Config).to receive(:parse).once
      Hubstats.config
    end

    it "memoizes the config object" do
      expect(Hubstats::Config).to receive(:parse).once { double(:config) }
      Hubstats.config
      Hubstats.config
    end

  end
```

Fix race condition in the config test
user
```ruby
require 'spec_helper'

describe Hubstats
  context ".config" do
    subject { Hubstats }
    after do
      Hubstats.class_variable_set(:@@config, nil)
    end
    it "creates a new config object" do
      expect(Hubstats::Config).to receive(:parse).once { double(:config) }
      subject.config
    end

    it "memoizes the config object" do
      expect(Hubstats::Config).to receive(:parse).once { double(:config) }
      subject.config
      subject.config
    end

  end
```
assistant