spec/local_spec.rb in jaysus-0.1.1 vs spec/local_spec.rb in jaysus-0.1.2
- old
+ new
@@ -10,13 +10,31 @@
end
describe "finder methods" do
before(:each) { FileUtils.cp('spec/fixtures/1', Site::Local.store_file_dir) }
+ describe ".store_file_dir_name" do
+ context "normal" do
+ subject { Site::Local }
+ its(:store_file_dir_name) { should == 'sites' }
+ end
+ context "within a module" do
+ subject { Kalipso::Site::Local }
+ its(:store_file_dir_name) { should == 'sites' }
+ end
+ end
+
describe ".all" do
- subject { Site::Local.all }
- its(:length) { should == 1}
- its(:first) { should be_a_kind_of(Site::Local) }
+ context "normal" do
+ subject { Site::Local.all }
+ its(:length) { should == 1}
+ its(:first) { should be_a_kind_of(Site::Local) }
+ end
+ context "within a module" do
+ subject { Kalipso::Site::Local.all }
+ its(:length) { should == 1}
+ its(:first) { should be_a_kind_of(Kalipso::Site::Local) }
+ end
end
describe ".find" do
subject { Site::Local.find(1) }
it { should_not be_nil }