Sha256: 3e13242c4382a57c3953f399ef4c140c465330eaa34b96452d010fe44a111b33

Contents?: true

Size: 742 Bytes

Versions: 15

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 be_true

      status_file.delete

      status_file.exists?.should be_false
    end
  end
end

Version data entries

15 entries across 15 versions & 1 rubygems

Version Path
litmus_paper-0.9.7 spec/litmus_paper/status_file_spec.rb
litmus_paper-0.9.6 spec/litmus_paper/status_file_spec.rb
litmus_paper-0.9.5 spec/litmus_paper/status_file_spec.rb
litmus_paper-0.9.4 spec/litmus_paper/status_file_spec.rb
litmus_paper-0.9.3 spec/litmus_paper/status_file_spec.rb
litmus_paper-0.9.2 spec/litmus_paper/status_file_spec.rb
litmus_paper-0.9.1 spec/litmus_paper/status_file_spec.rb
litmus_paper-0.9.0 spec/litmus_paper/status_file_spec.rb
litmus_paper-0.8.9 spec/litmus_paper/status_file_spec.rb
litmus_paper-0.8.8 spec/litmus_paper/status_file_spec.rb
litmus_paper-0.8.7 spec/litmus_paper/status_file_spec.rb
litmus_paper-0.8.6 spec/litmus_paper/status_file_spec.rb
litmus_paper-0.8.5 spec/litmus_paper/status_file_spec.rb
litmus_paper-0.8.4 spec/litmus_paper/status_file_spec.rb
litmus_paper-0.8.3 spec/litmus_paper/status_file_spec.rb