Sha256: 97e5e1942f708fb20cb46056090c4d26175a786b7a1112eb2d8b00108c596ed3

Contents?: true

Size: 873 Bytes

Versions: 7

Compression:

Stored size: 873 Bytes

Contents

require 'spec_helper'

describe CrashLog::Configuration do
  context 'release stage' do
    it 'includes production' do
      subject.release_stages.should include 'production'
    end

    it 'includes staging' do
      subject.release_stages.should include 'staging'
    end

    it 'is true if production' do
      subject.stage = 'production'
      subject.release_stage?.should be_true
    end

    it 'is true if staging' do
      subject.stage = 'staging'
      subject.release_stage?.should be_true
    end

    it 'is false in development' do
      subject.stage = 'development'
      subject.release_stage?.should be_false
    end
  end

  context 'valid?' do
    it 'is valid if api_key and secret are present' do
      subject.should_not be_valid
      subject.api_key = 'API_KEY'
      subject.secret = 'SECRET'
      subject.should be_valid
    end
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
crashlog-1.0.3 spec/crash_log/configuration_spec.rb
crashlog-1.0.2.1 spec/crash_log/configuration_spec.rb
crashlog-1.0.2 spec/crash_log/configuration_spec.rb
crashlog-1.0.1 spec/crash_log/configuration_spec.rb
crashlog-1.0.0 spec/crash_log/configuration_spec.rb
crashlog-1.0.0.rc2 spec/crash_log/configuration_spec.rb
crashlog-1.0.0.rc1 spec/crash_log/configuration_spec.rb