Skip to content
This repository has been archived by the owner on Feb 21, 2021. It is now read-only.

Commit

Permalink
Increased the test coverage of the default driectory
Browse files Browse the repository at this point in the history
  • Loading branch information
natedavisolds committed Feb 18, 2014
1 parent f4c23c2 commit 2320daf
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 12 deletions.
15 changes: 3 additions & 12 deletions spec/acceptance/default_directory_acceptance_spec.rb
Original file line number Diff line number Diff line change
@@ -1,16 +1,7 @@
require 'spec_helper'

describe "Default the directory to the caller classes directory and the pluralized version of the class name" do
class LoadingAllTest
include Identitee
end

it "loads all the identifiable before calling all" do
identifiables = LoadingAllTest.all_identifiables
identifiables.length.should == 2
end

class LazyLoadingTest
class DefaultDirectorySetTest
include Identitee

attr_accessor :successful
Expand All @@ -25,11 +16,11 @@ def successful?
end

it "has a identify_root_directory" do
LazyLoadingTest.identify_root_directory.should =~ /lazy_loading_tests/
DefaultDirectorySetTest.identify_root_directory.should =~ /default_directory_set_tests/
end

it "lazy loads identifyables" do
test = LazyLoadingTest.find_identifiable :autoload_test
test = DefaultDirectorySetTest.find_identifiable :default_directory_test
test.should_not be_nil
test.should be_successful
end
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
DefaultDirectorySetTest.identify :default_directory_test do
@successful = true
end

0 comments on commit 2320daf

Please sign in to comment.