Sha256: c575713d8c30b6986731f75b30181a576c74a276ac546e4fdd4c0d3002362f60
Contents?: true
Size: 1.32 KB
Versions: 8
Compression:
Stored size: 1.32 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 load from YAML" do Octopus.excluded_enviroments.should == ["cucumber", "test", "staging"] end it "should have the default excluded enviroments" do Octopus.instance_variable_set(:@excluded_enviroments, nil) Octopus.excluded_enviroments.should == ["development", "cucumber", "test"] end it "should configure the excluded enviroments" do Octopus.setup do |config| config.excluded_enviroments = [:cucumber, :test] end Octopus.excluded_enviroments.should == ['cucumber', 'test'] Octopus.setup do |config| config.excluded_enviroments = [:cucumber, :test, :staging] end end end end
Version data entries
8 entries across 8 versions & 1 rubygems