RailsCasts Pro episodes are now free!

Learn more or hide this

Marcel Canclini's Profile

GitHub User: canclini

Site: http://mazeway.posterous.com/

Comments by Marcel Canclini


Since this screencast I use the request specs for my development.
It works great for understanding of the function and as a direct mapping with use cases from RE.
The only issues I have is speed.
As for most of the specs I need a logged in user. This is therefore created in nearly every before block. Also, the user factory creates certain associated models as well (in this case a company.)

Is there a better/faster way to do it?
Would you use fixtures for those cases?

describe "Request Management Requests" do
  before do
    @user = create(:user)
    login @user
  it "lists open requests" do
    @req = create(:request, :company => @user.company)
    visit requests_path
    page.should have_content(@req.name)