Sha256: 1396d2ddfbbf197128c49d001861cd088c5cdcca8aaa9ae750ae4829d0d3d910

Contents?: true

Size: 694 Bytes

Versions: 2

Compression:

Stored size: 694 Bytes

Contents

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

describe Pkg do


  before do
    `mkdir /tmp/fancy` unless Dir.exists? "/tmp/fancy"
    `cp spec/fixtures/fancy.tgz /tmp/fancy`
  end

  it "should spawn!" do
    stub_request(:get, "http://cool.js/fancy.tgz").to_return(:body => "Hi")
    as = Pkg.new "cool", "http://cool.js/fancy.tgz"
    as.should be_instance_of Pkg
  end

  it "should spawn!" do
    as = Pkg.new "cool", "http://cool.js"
    as.should be_instance_of Pkg
  end

  it "should get file from unpack" do
    as = Pkg.new "fancy", "/tmp/fancy/fancy.tgz"
    as.get("fancy/fancy.css").should eql("// Fancy css!\n\n#foo {\n  padding: 10px;\n}\n")

  end

end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
assetify-0.2.2 spec/assetify/pkg_spec.rb
assetify-0.2.1 spec/assetify/pkg_spec.rb