Sha256: fbd81b573783b6a521b153cfc1f3fd6ac6e44dcbde75626fa6b9c6cdd08c0015
Contents?: true
Size: 1.66 KB
Versions: 6
Compression:
Stored size: 1.66 KB
Contents
require 'dir_spec_helper' CLASS = RailsAssist::Artifact::Directory class ArtDir include CLASS end describe RailsAssist::Artifact::Directory do # use_helper :directories before do RailsAssist::Directory.rails_root = fixtures_dir @test = ArtDir.new end RailsAssist::Artifact.app_artifacts.each do |name| eval %{ describe '##{name}_dir' do it "should return #{name} directory name" do CLASS.#{name}_dirpath.should match /app\/\#{name}/ CLASS.#{name}_dir.path.should match /app\/\#{name}/ @test.#{name}_dir.path.should match /app\/\#{name}/ end end } end describe '#observer_dir' do it "should return observer directory name" do CLASS.observer_dir.path.should match /app\/models/ @test.observer_dirpath.should match /app\/models/ end end describe '#migration_dir' do it "should return migration directory name" do CLASS.migration_dir.path.should match /db\/migrate/ @test.migration_dirpath.should match /db\/migrate/ end end [:initializer, :locale].each do |name| eval %{ describe '##{name}_dir' do it "should return #{name} directory name" do CLASS.#{name}_dir.path.should match /config\/\#{name}/ @test.#{name}_dirpath.should match /config\/\#{name}/ end end } end [:stylesheet, :javascript].each do |name| eval %{ describe '##{name}_dir' do it "should return #{name} directory name" do CLASS.#{name}_dir.path.should match /public\/\#{name}/ @test.#{name}_dirpath.should match /public\/\#{name}/ end end } end end
Version data entries
6 entries across 6 versions & 1 rubygems