spec/lib/simple_navigation_spec.rb in simple-navigation-2.5.3 vs spec/lib/simple_navigation_spec.rb in simple-navigation-2.5.4

- old
+ new

@@ -10,17 +10,18 @@ SimpleNavigation.config_files.should == {} end end describe 'config_file?' do - before(:each) do - SimpleNavigation.stub!(:config_file_name => 'file_name') - end it "should check for the file existance with the file_name" do - File.should_receive(:exists?).with('file_name') + File.should_receive(:exists?).with('path_to_config/ctx_navigation.rb') SimpleNavigation.config_file?(:ctx) end + it "should check for the file existance on default context" do + File.should_receive(:exists?).with('path_to_config/navigation.rb') + SimpleNavigation.config_file? + end context 'config file exists' do before(:each) do File.stub!(:exists? => true) end it {SimpleNavigation.config_file?(:ctx).should be_true} @@ -422,6 +423,6 @@ SimpleNavigation.handle_explicit_navigation end end end -end \ No newline at end of file +end