Sha256: ca73d06621af0dec14595274986250816d7b479dea4346b46a81bc8cab4a6cae

Contents?: true

Size: 1.45 KB

Versions: 5

Compression:

Stored size: 1.45 KB

Contents

require 'spec_helper'
require 'generators/guilded_assets/guilded_assets_generator'

describe GuildedAssetsGenerator do
  before :each do
    @destination = File.join 'tmp', 'test_app'
    @source = GuildedAssetsGenerator.source_root
    GuildedAssetsGenerator.start '', :destination_root => @destination
  end
  
  after :each do
    FileUtils.rm_rf @destination
  end
  
  {"guilded.js" => "public/javascripts/guilded.js",
   "guilded.min.js" => "public/javascripts/guilded.min.js",
   "jquery-1.2.6.js" => "public/javascripts/jquery/jquery-1.2.6.js",
   "jquery-1.2.6.min.js" => "public/javascripts/jquery/jquery-1.2.6.min.js",
   "jquery-1.3.2.js" => "public/javascripts/jquery/jquery-1.3.2.js",
   "jquery-1.3.2.min.js" => "public/javascripts/jquery/jquery-1.3.2.min.js",
   "jquery-url.js" => "public/javascripts/jquery/jquery-url.js",
   "jquery-url.min.js" => "public/javascripts/jquery/jquery-url.min.js",
   "mootools-1.2.3.js" => "public/javascripts/mootools/mootools-1.2.3.js",
   "mootools-1.2.3.min.js" => "public/javascripts/mootools/mootools-1.2.3.min.js",
   "reset-min.css" => "public/stylesheets/reset-min.css"}.each do |file, path|  
    
    it "should copy '#{file}' to '#{path}'" do
      File.exists?( File.join( @destination, path ) ).should be_true
    end
    
    it "should agree that the contents of '#{file}' are identical to '#{path}'" do
      File.read( File.join( @source, file ) ).should eql File.read( File.join( @destination, path ) )
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
guilded-1.1.0 spec/generators/guilded_assets_generator_spec.rb
guilded-1.0.14 spec/generators/guilded_assets_generator_spec.rb
guilded-1.0.13 spec/generators/guilded_assets_generator_spec.rb
guilded-1.0.12 spec/generators/guilded_assets_generator_spec.rb
guilded-1.0.10 spec/generators/guilded_assets_generator_spec.rb