Sha256: bab9d86b2d372780de6dadb972fba88921aeecce58c0278fee2ea9e2228bce07

Contents?: true

Size: 705 Bytes

Versions: 16

Compression:

Stored size: 705 Bytes

Contents

require 'valise'
require 'file-sandbox'

describe "Invidual items in the set" do
  include FileSandbox
  let (:root_path) do
    sandbox.new :directory => "root"
    sandbox.new :file => "root/item", :with_contents => "testing"
    "root"
  end
  let (:set) do
    path = root_path
    Valise::Set.define do
      rw path
    end
  end

  subject { set.find("item") }

  its (:full_path) { should == "root/item" }

  describe "#contents=" do
    its (:contents) { should == "testing" }

    it "raw_file" do
      subject.raw_file.path.should == "root/item"
    end

    it "should make contents available" do
      subject.open do |file|
        file.read.should == "testing"
      end
    end
  end
end

Version data entries

16 entries across 16 versions & 1 rubygems

Version Path
valise-1.1.4 spec/item.rb
valise-1.1.3 spec/item.rb
valise-1.1.2 spec/item.rb
valise-1.1.1 spec/item.rb
valise-1.1.0 spec/item.rb
valise-1.0.0 spec/item.rb
valise-0.9.1 spec/item.rb
valise-0.9.0 spec/item.rb
valise-0.8.2 spec/item.rb
valise-0.8.1 spec/item.rb
valise-0.8 spec/item.rb
valise-0.7 spec/item.rb
valise-0.6 spec/item.rb
valise-0.5 spec/item.rb
valise-0.4 spec/item.rb
valise-0.3 spec/item.rb