Sha256: 95c85319668046775050ae27c24c9f9e1802c0a115b57abb056cf9133aa3022b

Contents?: true

Size: 982 Bytes

Versions: 41

Compression:

Stored size: 982 Bytes

Contents

require "lib/builders/spec_helper"

describe SC::Builder::ChanceFile do

  include SC::SpecHelpers
  include SC::BuilderSpecHelper

  before do
    std_before :chance_test
  end

  after do
    std_after
  end


  it "should extract files from Chance instance" do

    # We create our own Chance instance and add custom files in this test.
    instance = Chance::Instance.new()

    filename = "stylesheet@test.css"
    entry = @manifest.add_entry filename,
      :chance_instance => instance,

      # Chance has a test file made just for testing purposes
      :chance_file => "chance-test.css",

      # Need this
      :source_entries => []

    dest = entry.build_path

    # Build using the entry we created
    SC::Builder::ChanceFile.build(entry, dest)
    result = File.readlines(dest)*""

    # There is a static_url; it should be replaced, but the file does not
    # exist so itw ill turn into ''
    result.strip.should == ".hello { background: url(''); }"
  end

end

Version data entries

41 entries across 41 versions & 1 rubygems

Version Path
sproutcore-1.11.0 spec/lib/builders/chance_file_spec.rb
sproutcore-1.11.0.rc3 spec/lib/builders/chance_file_spec.rb
sproutcore-1.11.0.rc2 spec/lib/builders/chance_file_spec.rb
sproutcore-1.11.0.rc1 spec/lib/builders/chance_file_spec.rb
sproutcore-1.10.3.1 spec/lib/builders/chance_file_spec.rb
sproutcore-1.10.2 spec/lib/builders/chance_file_spec.rb
sproutcore-1.10.1 spec/lib/builders/chance_file_spec.rb
sproutcore-1.10.0 spec/lib/builders/chance_file_spec.rb
sproutcore-1.10.0.rc.3 spec/lib/builders/chance_file_spec.rb
sproutcore-1.10.0.rc.2 spec/lib/builders/chance_file_spec.rb
sproutcore-1.10.0.rc.1 spec/lib/builders/chance_file_spec.rb
sproutcore-1.9.2 spec/lib/builders/chance_file_spec.rb
sproutcore-1.9.1 spec/lib/builders/chance_file_spec.rb
sproutcore-1.9.0 spec/lib/builders/chance_file_spec.rb
sproutcore-1.8.2.1 spec/lib/builders/chance_file_spec.rb
sproutcore-1.8.1 spec/lib/builders/chance_file_spec.rb
sproutcore-1.8.0 spec/lib/builders/chance_file_spec.rb
sproutcore-1.7.1.beta-java spec/lib/builders/chance_file_spec.rb
sproutcore-1.7.1.beta spec/lib/builders/chance_file_spec.rb
sproutcore-1.6.0.1-java spec/lib/builders/chance_file_spec.rb