Sha256: 7f184bda96b16f0b0812280ddf2a1e0a171304d32af8c7b1756f2a7c072480bb

Contents?: true

Size: 1.05 KB

Versions: 16

Compression:

Stored size: 1.05 KB

Contents

require 'spec_helper'

CLASS = Rails3::Assist::Directory::App

class AppDir
  include CLASS
end

describe Rails3::Assist::Directory::App do
  # use_helper :directories

  before do
    Rails3::Assist::Directory.rails_root = File.dirname (__FILE__)
  end

  describe '#self.app_directories' do
    it "should return symbols list of Rails 3 app directories" do
      CLASS.app_directories.should include :controllers, :mailers, :helpers, :views, :models, :permits
    end
  end

  describe '#app_directories' do
    it "should return symbols list of Rails 3 app directories" do
      AppDir.new.app_directories.should include :controllers, :mailers, :helpers, :views, :models, :permits
    end
  end


  describe '#self.app_dir' do
    it "should the current Rails 3 ap dir when Rails root is set" do
      CLASS.app_dir.should == File.join(File.dirname(__FILE__), 'app')
    end
  end

  describe '#app_dir' do
    it "should the current Rails 3 ap dir when Rails root is set" do
      AppDir.new.app_dir.should == File.join(File.dirname(__FILE__), 'app')
    end
  end
end

Version data entries

16 entries across 16 versions & 1 rubygems

Version Path
rails3_assist-0.3.7 spec/rails3_assist/directory/app_spec.rb
rails3_assist-0.3.6 spec/rails3_assist/directory/app_spec.rb
rails3_assist-0.3.5 spec/rails3_assist/directory/app_spec.rb
rails3_assist-0.3.4 spec/rails3_assist/directory/app_spec.rb
rails3_assist-0.3.3 spec/rails3_assist/directory/app_spec.rb
rails3_assist-0.3.2 spec/rails3_assist/directory/app_spec.rb
rails3_assist-0.3.1 spec/rails3_assist/directory/app_spec.rb
rails3_assist-0.3.0 spec/rails3_assist/directory/app_spec.rb
rails3_assist-0.2.13 spec/rails3_assist/directory/app_spec.rb
rails3_assist-0.2.12 spec/rails3_assist/directory/app_spec.rb
rails3_assist-0.2.11 spec/rails3_assist/directory/app_spec.rb
rails3_assist-0.2.10 spec/rails3_assist/directory/app_spec.rb
rails3_assist-0.2.9 spec/rails3_assist/directory/app_spec.rb
rails3_assist-0.2.8 spec/rails3_assist/directory/app_spec.rb
rails3_assist-0.2.7 spec/rails3_assist/directory/app_spec.rb
rails3_assist-0.2.5 spec/rails3_assist/directory/app_spec.rb