Sha256: 1bccc9aafb7c8298f2f4f0bae68b5afbda71d3e7ccc4c0a310e69cedeac7b48d

Contents?: true

Size: 1.13 KB

Versions: 7

Compression:

Stored size: 1.13 KB

Contents

require 'spec_helper'

CLASS = RailsAssist::Directory::Root

class RootDir
  include CLASS
end

def rails_root
  RailsAssist::Directory.rails_root
end


describe RailsAssist::Directory::Root do
  # use_helper :directories

  before do
    RailsAssist::Directory.rails_root = fixtures_dir
  end

  describe '#self.root_directories' do
    it "should return symbols list of Rails 3 root directories" do
      CLASS.root_directories.should include :app, :config, :db
    end
  end

  describe '#root_directories' do
    it "should return symbols list of Rails 3 root directories" do
      RootDir.new.root_directories.should include :app, :config, :db
    end
  end


  describe '#self.root_dir' do
    it "should the current Rails 3 ap dir when Rails root is set" do
      CLASS.root_dir.path.should == rails_root
    end
  end

  describe '#self.root_dirpath' do
    it "should the current Rails 3 ap dir when Rails root is set" do
      CLASS.root_dirpath.should == rails_root
    end
  end

  describe '#root_dir' do
    it "should the current Rails 3 ap dir when Rails root is set" do
      RootDir.new.root_dir.path.should == rails_root
    end
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
rails_assist-0.5.3 spec/rails_assist/directory/root_spec.rb
rails_assist-0.5.2 spec/rails_assist/directory/root_spec.rb
rails_assist-0.5.1 spec/rails_assist/directory/root_spec.rb
rails_assist-0.5.0 spec/rails_assist/directory/root_spec.rb
rails_assist-0.4.4 spec/rails_assist/directory/root_spec.rb
rails_assist-0.4.3 spec/rails_assist/directory/root_spec.rb
rails_assist-0.4.2 spec/rails_assist/directory/root_spec.rb