Sha256: e023f3014443e471b912858ad618b447938d15fafc9887881b5c2252d7a462b1

Contents?: true

Size: 890 Bytes

Versions: 16

Compression:

Stored size: 890 Bytes

Contents

require 'spec_helper'

CLASS = Rails3::Assist::Artifact::FileName

class ArtDir
  include CLASS
end

describe Rails3::Assist::Artifact::FileName do
  # use_helper :directories

  before do
    Rails3::Assist::Directory.rails_root = File.dirname (__FILE__)
    @test = ArtDir.new
  end

  (Rails3::Assist.artifacts - [:migration, :view]).each do |name|
    eval %{
      describe '##{name}_file_name' do
        it "should return the file name for #{name} using class method" do
          clazz = Rails3::Assist::Artifact::#{name.to_s.camelize}
          clazz.#{name}_file_name('user').should match /user/
        end

        it "should return the file name for #{name} using instance method" do
          art = ArtDir.new
          art.extend Rails3::Assist::Artifact::#{name.to_s.camelize}
          art.#{name}_file_name('user').should match /user/
        end
      end
    }
  end
end

Version data entries

16 entries across 16 versions & 1 rubygems

Version Path
rails3_artifactor-0.4.0 spec/rails3_artifactor/artifact/file_name/artifacts_spec.rb
rails3_artifactor-0.3.2 spec/rails3_artifactor/artifact/file_name/artifacts_spec.rb
rails3_artifactor-0.3.1 spec/rails3_artifactor/artifact/file_name/artifacts_spec.rb
rails3_artifactor-0.3.0 spec/rails3_artifactor/artifact/file_name/artifacts_spec.rb
rails3_artifactor-0.2.8 spec/rails3_artifactor/artifact/file_name/artifacts_spec.rb
rails3_artifactor-0.2.7 spec/rails3_artifactor/artifact/file_name/artifacts_spec.rb
rails3_artifactor-0.2.6 spec/rails3_artifactor/artifact/file_name/artifacts_spec.rb
rails3_artifactor-0.2.5 spec/rails3_artifactor/artifact/file_name/artifacts_spec.rb
rails3_artifactor-0.2.4 spec/rails3_artifactor/artifact/file_name/artifacts_spec.rb
rails3_artifactor-0.2.3 spec/rails3_artifactor/artifact/file_name/artifacts_spec.rb
rails3_artifactor-0.2.2 spec/rails3_artifactor/artifact/file_name/artifacts_spec.rb
rails3_artifactor-0.2.1 spec/rails3_artifactor/artifact/file_name/artifacts_spec.rb
rails3_artifactor-0.1.5 spec/rails3_artifactor/artifact/file_name/artifacts_spec.rb
rails3_artifactor-0.1.4 spec/rails3_artifactor/artifact/file_name/artifacts_spec.rb
rails3_artifactor-0.1.3 spec/rails3_artifactor/artifact/file_name/artifacts_spec.rb
rails3_artifactor-0.1.2 spec/rails3_artifactor/artifact/file_name/artifacts_spec.rb