Sha256: 7f90baf6d987788e23c32878c4c906f3f1ebb7bad84e1f39bb2d40fb28130613

Contents?: true

Size: 632 Bytes

Versions: 1

Compression:

Stored size: 632 Bytes

Contents

require 'spec_helper'

describe Steam do
  before(:all) do
    @apikey = Steam.apikey
  end

  after(:each) do
    Steam.apikey = @apikey
  end

  it 'should return a Steam API key if one is defined' do
    Steam.apikey.should_not be_nil
  end

  it 'should return an error if the Steam Key is missing' do
    Steam.apikey = nil
    lambda { Steam.apikey }
      .should raise_error(ArgumentError, /Please set your Steam API key/)
  end

  it 'should return a new value if set to a different API key' do
    old = Steam.apikey
    Steam.apikey = 'blah'
    Steam.apikey.should_not == old
    Steam.apikey.should == 'blah'
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
steam-api-1.0.1 spec/steam_spec.rb