Testing in specific namespace
rspec, ruby
Solution
The RSpec Book ( http://pragprog.com/book/achbd/the-rspec-book ) gives a solution :
3 module Codebreaker
4 describe Game do
5 describe "#start" do
... The second statement declares a Ruby module named Codebreaker.This isn’t necessary in order to run the specs, but it provides some conveniences. For example, we don’t have to fully qualify Game on line 4.
So, try to put your spec inside a `Server` module. HTH.
Problem
I'm trying to test some classes in namespace, currently I have this code: ``` describe Server::SessionController do it "should create session" do Server::LoginController.stub(:authenitcate).and_return(session_id) Server::SessionController.... Server::SessionController.... end end ``` How to get rid of repeatable `Server` namespace?