Sha256: 6f60a702c061ddd88e5fd21aeb7542f82a81319634c1198d849238e8234c7cda

Contents?: true

Size: 1.15 KB

Versions: 13

Compression:

Stored size: 1.15 KB

Contents

require 'spec_helper'

describe BigBrother::StatusFile do
  describe "initialize" do
    it "accepts symbols as arguments, since that's how they will come from configuration" do
      status_file = BigBrother::StatusFile.new(:foo)
      status_file.create("for testing")

      status_file.exists?.should == true
    end
  end

  describe "create" do
    it "creates a nested file" do
      status_file = BigBrother::StatusFile.new("foo", "bar")
      status_file.create("for testing")

      status_file.exists?.should == true
    end

    it "creates a file" do
      status_file = BigBrother::StatusFile.new("foo")
      status_file.create("for testing")

      status_file.exists?.should == true
    end

    it "writes the content" do
      status_file = BigBrother::StatusFile.new("foo")
      status_file.create("for testing")

      status_file.content.should == "for testing"
    end
  end

  describe "delete" do
    it "removes the file" do
      status_file = BigBrother::StatusFile.new("foo")
      status_file.create("for testing")

      status_file.exists?.should be_true

      status_file.delete

      status_file.exists?.should be_false
    end
  end
end

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
big_brother-0.8.8.1 spec/big_brother/status_file_spec.rb
big_brother-0.8.8 spec/big_brother/status_file_spec.rb
big_brother-0.8.7 spec/big_brother/status_file_spec.rb
big_brother-0.6.8 spec/big_brother/status_file_spec.rb
big_brother-0.6.7 spec/big_brother/status_file_spec.rb
big_brother-0.6.6 spec/big_brother/status_file_spec.rb
big_brother-0.6.5 spec/big_brother/status_file_spec.rb
big_brother-0.6.4 spec/big_brother/status_file_spec.rb
big_brother-0.6.3 spec/big_brother/status_file_spec.rb
big_brother-0.6.2 spec/big_brother/status_file_spec.rb
big_brother-0.6.1 spec/big_brother/status_file_spec.rb
big_brother-0.6.0 spec/big_brother/status_file_spec.rb
big_brother-0.5.0 spec/big_brother/status_file_spec.rb