spec/loader_spec.rb in loader-3.0.1 vs spec/loader_spec.rb in loader-3.1.0
- old
+ new
@@ -10,10 +10,18 @@
expect { Sample::Dog }.to_not raise_error
expect { Sample::Dog::Tail }.to_not raise_error
expect { Sample::Cat::Paw }.to_not raise_error
end
+ it 'should be able to fetch constant even during in an another namespace' do
+ expect { SomeClass.class_eval { TopConstant } }.to_not raise_error
+ end
+
+ it "should able to fetch the constant even if it's referenced through not the main namespace" do
+ expect { TopLevel::TopLevelToo }.to_not raise_error
+ end
+
it 'should require unrequired gems' do
expect { YAML }.to_not raise_error
end
end
@@ -29,10 +37,10 @@
end
it 'should require the given relative folder content recursively like this' do
require_relative_directory 'fixtures/require_relative_directory/relative_folder_recursive/**'
- expect{ TestConstant2::Stuff2 }.to_not raise_error
+ expect { TestConstant2::Stuff2 }.to_not raise_error
end
end
end
\ No newline at end of file