Sha256: df0abaaa96e009ed52abe126d6ce65c6189cdca720c92e71ed0c4a1a38a9e691

Contents?: true

Size: 1.1 KB

Versions: 14

Compression:

Stored size: 1.1 KB

Contents

require File.expand_path(File.dirname(__FILE__) + '/../spec_helper')

describe Octopus do
  describe "#config method" do
    it "should load shards.yml file to start working" do
      Octopus.config().should be_kind_of(Hash)
    end
  end

  describe "#directory method" do
    it "should return the directory that contains the shards.yml file" do
      Octopus.directory().should == File.expand_path(File.dirname(__FILE__) + "/../")
    end
  end

  describe "#env method" do
    it "should return 'production' when is outside of a rails application" do
      Octopus.env().should == 'octopus'
    end
  end
  
  describe "#setup method" do    
    it "should have the default octopus enviroment as production" do
      Octopus.enviroments.should == ["production"]
    end
    
    it "should allow the user to configure the octopus enviroments" do
      Octopus.setup do |config|
        config.enviroments = [:production, :staging]
      end
      
      Octopus.enviroments.should == ['production', 'staging']      

      Octopus.setup do |config|
        config.enviroments = [:production]
      end
    end
  end
end

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
ar-octopus-0.3.0 spec/octopus/octopus_spec.rb
ar-octopus-0.2.2 spec/octopus/octopus_spec.rb
ar-octopus-0.2.1 spec/octopus/octopus_spec.rb
ar-octopus-0.2.0 spec/octopus/octopus_spec.rb
ar-octopus-0.1.2 spec/octopus/octopus_spec.rb
ar-octopus-0.1.1 spec/octopus/octopus_spec.rb
ar-octopus-0.1.0 spec/octopus/octopus_spec.rb
ar-octopus-0.0.30 spec/octopus/octopus_spec.rb
ar-octopus-0.0.29 spec/octopus/octopus_spec.rb
ar-octopus-0.0.28 spec/octopus/octopus_spec.rb
ar-octopus-0.0.27 spec/octopus/octopus_spec.rb
ar-octopus-0.0.26 spec/octopus/octopus_spec.rb
ar-octopus-0.0.25 spec/octopus/octopus_spec.rb
ar-octopus-0.0.24 spec/octopus/octopus_spec.rb