Sha256: 539b40f70e4bdb6de745f223b664fc0d4bde53fe63c10ccf90795fd13f66a7a1

Contents?: true

Size: 742 Bytes

Versions: 12

Compression:

Stored size: 742 Bytes

Contents

require 'spec_helper'

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

      status_file.exists?.should == true
    end

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

      status_file.content.should match(/for testing/)
    end
  end

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

      status_file.exists?.should == true

      status_file.delete

      status_file.exists?.should == false
    end
  end
end

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
litmus_paper-1.6.2 spec/litmus_paper/status_file_spec.rb
litmus_paper-1.6.1 spec/litmus_paper/status_file_spec.rb
litmus_paper-1.6.0 spec/litmus_paper/status_file_spec.rb
litmus_paper-1.5.0 spec/litmus_paper/status_file_spec.rb
litmus_paper-1.4.2 spec/litmus_paper/status_file_spec.rb
litmus_paper-1.4.1 spec/litmus_paper/status_file_spec.rb
litmus_paper-1.3.0 spec/litmus_paper/status_file_spec.rb
litmus_paper-1.2.0 spec/litmus_paper/status_file_spec.rb
litmus_paper-1.1.1 spec/litmus_paper/status_file_spec.rb
litmus_paper-1.1.0 spec/litmus_paper/status_file_spec.rb
litmus_paper-1.0.0 spec/litmus_paper/status_file_spec.rb
litmus_paper-0.9.9 spec/litmus_paper/status_file_spec.rb