Sha256: 9e190844286f7cf0f952549d79255818d2093e4e9e87ab4d86c78cab90bc697d

Contents?: true

Size: 992 Bytes

Versions: 2

Compression:

Stored size: 992 Bytes

Contents

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

describe My::Config do
  describe "scripts" do
    describe "in the production environment" do
      it "should return the .my_scripts file" do
        My::Config.stubs(:environment).returns("production")
        My::Config.scripts.should == File.expand_path("~/.my_scripts")
      end
    end
    describe "in the test environment" do
      it "should return the test.yml file" do
        My::Config.stubs(:environment).returns("test")
        My::Config.scripts.should == File.expand_path("test.yml")
      end
    end
    describe "in the cucumber environment" do
      it "should return the test.yml file" do
        My::Config.stubs(:environment).returns("cucumber")
        My::Config.scripts.should == File.expand_path("test.yml")
      end
    end
  end

  describe "version" do
    it "should return the version in the VERSION file" do
      My::Config.version.should == File.read("VERSION").chomp
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
my-0.3.1 spec/config_spec.rb
my-0.3.0 spec/config_spec.rb