Sha256: c8cbcfe8d621c52007eac6674a2936c051ca301302947490bd381ea551c3103d

Contents?: true

Size: 609 Bytes

Versions: 1

Compression:

Stored size: 609 Bytes

Contents

require 'spec_helper'
describe Dotman do
  describe "::ensure_dotman_folder_exists" do
    context "$HOME.dotman/ does not exist" do
      it "creates the dotman directory" do
        File.stub(:directory?).and_return(true)
        FileUtils.should_receive(:mkdir).with("$HOME/.dotman")
        Dotman.ensure_dotman_folder_exists
      end
    end

    context "$HOME.dotman/ already exists" do
      it "does nothing" do
        File.stub(:directory?).and_return(false)
        FileUtils.should_not_receive(:mkdir).with("$HOME/.dotman")
        Dotman.ensure_dotman_folder_exists
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
dotman-0.0.1 spec/dotman_spec.rb