Sha256: 4e195a855ba2b20ad9eba9bb7b91dbfb27a7c385fb775bf2ba3de7f5fff178ee

Contents?: true

Size: 990 Bytes

Versions: 18

Compression:

Stored size: 990 Bytes

Contents

require 'phut/setting'

describe Phut do
  describe '.pid_dir' do
    Given(:result) { Phut.pid_dir }
    Then { result == Dir.tmpdir }

    context "pid_dir = '/tmp/pid'" do
      Given { Phut.pid_dir = '/tmp/pid' }
      Then { result == '/tmp/pid' }
    end

    context "pid_dir = '.'" do
      Given { Phut.pid_dir = '.' }
      Then { result == File.expand_path('.') }
    end
  end

  describe '.log_dir' do
    Given(:result) { Phut.log_dir }
    Then { result == Dir.tmpdir }

    context "log_dir = '/tmp/log'" do
      Given { Phut.log_dir = '/tmp/log' }
      Then { result == '/tmp/log' }
    end

    context "log_dir = '.'" do
      Given { Phut.log_dir = '.' }
      Then { result == File.expand_path('.') }
    end
  end

  describe '.socket_dir' do
    Given(:result) { Phut.socket_dir }
    Then { result == Dir.tmpdir }

    context "socket_dir = '/tmp/socket'" do
      Given { Phut.socket_dir = '/tmp/socket' }
      Then { result == '/tmp/socket' }
    end
  end
end

Version data entries

18 entries across 18 versions & 1 rubygems

Version Path
phut-0.6.8 spec/phut_spec.rb
phut-0.6.7 spec/phut_spec.rb
phut-0.6.6 spec/phut_spec.rb
phut-0.6.5 spec/phut_spec.rb
phut-0.6.4 spec/phut_spec.rb
phut-0.6.3 spec/phut_spec.rb
phut-0.6.2 spec/phut_spec.rb
phut-0.6.1 spec/phut_spec.rb
phut-0.6.0 spec/phut_spec.rb
phut-0.5.0 spec/phut_spec.rb
phut-0.4.0 spec/phut_spec.rb
phut-0.3.1 spec/phut_spec.rb
phut-0.3.0 spec/phut_spec.rb
phut-0.2.4 spec/phut_spec.rb
phut-0.2.3 spec/phut_spec.rb
phut-0.2.2 spec/phut_spec.rb
phut-0.2.0 spec/phut_spec.rb
phut-0.1.0 spec/phut_spec.rb