Sha256: 33dbd5840e2944a5e64208661b956e2e50e7af708d7f7c6277f8365909873f5c

Contents?: true

Size: 1.09 KB

Versions: 5

Compression:

Stored size: 1.09 KB

Contents

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

describe Beagle do
  it 'should respond to all the methods' do
    Beagle.should respond_to(*%w(home home= start stop status query running?))
  end

  it 'should not work if Beagle.home is nil' do
    Beagle.home = nil
    lambda { Beagle.start }.should raise_error
  end

  it 'should return a true or false value from running' do
    # TODO: use temp dir
    Beagle.home = '/balls'
    Beagle.running?.is_boolean?.should be_true
  end

  it 'should probably not be running for a random directory' do
    # TODO: use temp dir
    Beagle.home = '/balls'
    Beagle.running?.should be_false
  end

  it 'should return a String for the status' do
    # TODO: use temp dir
    Beagle.home = '/balls'
    Beagle.status.should be_a_kind_of(String)
  end

  it 'should return a true or false value from start' do
    # TODO: use temp dir
    Beagle.home = '/usr'
    Beagle.start.is_boolean?.should be_true
  end

  it 'should return a true or false value from stop' do
    # TODO: use temp dir
    Beagle.home = '/usr'
    Beagle.stop.is_boolean?.should be_true
  end
end

Version data entries

5 entries across 5 versions & 2 rubygems

Version Path
darkhelmet-darkext-0.11.0 spec/beagle_spec.rb
darkhelmet-darkext-0.11.1 spec/beagle_spec.rb
darkhelmet-darkext-0.11.2 spec/beagle_spec.rb
darkhelmet-darkext-0.12.0 spec/beagle_spec.rb
darkext-0.12.0 spec/beagle_spec.rb