similar to: Rails NameError : uninitialized constant RelationshipsController

Displaying 8 results from an estimated 8 matches similar to: "Rails NameError : uninitialized constant RelationshipsController"

2013 Jan 09
2
Rails 3.2.10 and Rspec Tests that Fail?
The following tests used to reside in requests directory and used to work ... since I have upgraded to rails 3.2.9 and now 3.2.10 they fail. I have the following tests in(I am only showing the first two tests): spec/features/authentication_pages_spec.rb require ''spec_helper'' describe "Authentication" do subject { page }
2013 Oct 08
1
Trouble with rspec and FactoryGirl Sequence
I''m following Michael Hartl''s Ruby on Rails 3 Tutorial but I''m using Rails 3.2.8 and FactoryGirl 4.2.0 and rspec 2.14.1 I''m in chapter 10 trying to generate tests for pagination (using will_paginate 3.2.5 which works fine in dev) I can get FactoryGirl to test just fine if I don''t use Sequence but I can''t seem to figure out the correct syntax
2012 Jun 08
0
Having difficulty testing redirects with Rspec and Capybara
Every time I try to test a redirect, I get this error: @request must be an ActionDispatch::Request Any idea why? I''m using Rspec-Rails 2.9.0, Capybara 1.1.2, and Rails 3.2. Here''s my test: describe "AdminAccountPages" do subject { page } let(:user) { FactoryGirl.create(:user) } let(:account) { user.owned_accounts.create!(name: "ACME Corp",
2012 Dec 03
2
Stop User from Changing URL
I have an authentication and autherization system built on the same lines outlined by Michael Hartl, rails tutorial. Here is the employees_controller.rb: class EmployeesController < ApplicationController before_filter :signed_in_employee, only: [:index, :edit, :update] before_filter :correct_employee, only: [:edit, :update] etc etc
2007 Dec 01
5
specifying an HTTP status code
Hi all, I''m just starting to work w/ RSpec, so I hope this question isn''t too obvious or missing the point somehow: Is there a way in RSpec to specify that a controller action should use a specific HTTP status code? Specifically I want to test for the usage of 301 as opposed to 302, for a permanent redirection. response.should be_redirect looks like it calls
2007 Oct 26
5
specing rescue, ensure and else blocks of an Exception
Greetings, I''m using rspec with rcov for my applications and there is one issue which I cannot solve nor can find any proper information regarding it: specing what is in a rescue block in case of an exception. I''m using Ruby on Rails and I usually make use of exceptions in my controllers, like the following example: def action @foo = Foo.find(1)
2012 Jul 17
24
Static Pages from Railcast
Hi everyone, I need several pages to be static but also modify when requested. I try following the railcast from Ryan at http://railscasts.com/episodes/117-semi-static-pages?view=comments Here what I have done!! rails g scaffold Pages name:string permanentlink:string title:string author:string access_level:string is_published:boolean meta_description:string meta_keyword:string
2007 Aug 15
4
nuby: how spec redirect_to at ApplicationController
Good morning rspec people! Still rspec nuby: I must do something wrong obviously. How can I spec about redirect_to at ApplicationController describe ApplicationController do it "method login_required should redirect to home path without login" do pending "I tried to use controller.login_required.should be_redirected and got NoMethodError with nil object