Sha256: d5563fd63f7c3157d4b476d7bd831737f74d7e3db08d58f3fe0fb1be76f2cf85
Contents?: true
Size: 923 Bytes
Versions: 2
Compression:
Stored size: 923 Bytes
Contents
require 'fileutils' describe "Generator" do def project_file(*parts) File.expand_path(File.join(File.dirname(__FILE__), "..", *parts)) end before :all do @root_dir = project_file("spec", "fixtures", "generator-test") end before :each do init_cmd = project_file("bin", "sm-init") `cd #{File.dirname(@root_dir)} && #{init_cmd} #{File.basename(@root_dir)}` end after :each do FileUtils.rm_rf(@root_dir) end it "should copy template files" do template_dir = project_file("lib", "template", "**/*") Dir[template_dir].each do |f| File.exists?("#{@root_dir}/#{f.split('template/')[1]}").should be_true end end it "should create empty directories" do %w(build javascripts images).each do |d| File.exists?("#{@root_dir}/#{d}").should be_true end end xit "should use user-defined template directory" do # Write support/spec end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
tdreyno-staticmatic-2.9.3 | spec/generator_spec.rb |
tdreyno-staticmatic-2.9.4 | spec/generator_spec.rb |