search for: pages_controller_spec

Displaying 8 results from an estimated 8 matches for "pages_controller_spec".

2011 Apr 15
7
warning: toplevel constant XYZ referenced Admin:XYZ
I have an odd problem. I got controllers in a namespace and controllers outside of the namespace. For example, I have a PagesController and a Admin::PagesController. When I run rspec from the top, tests pass and I get the following warning: spec/controllers/admin/pages_controller_spec.rb:4: warning: toplevel constant PagesController referenced by Admin::PagesController This makes no sense. I do have a PagesController and an Admin::PagesController and specs for both that are declared properly. I get this for 3 out of about 20 controllers. Any ideas?
2011 Sep 07
3
Method get of ActionController::TestCase ignores routes.rb?
Hi! I''m running into issue which seems to indicate that ActionController::TestCase.get() method ignores what I have in routes.rb. Happens in 3.0.10 and 3.1.0 too. I have the following RSpec2 test of my XmlRpcController#index action: it "should get nothing in response to GET request" do get :index response.response_code.should == 400 #bad_request end And the only line
2014 Apr 04
0
Rspec not running properly
..._control after Rack 1.5. FFFFFFFFF Failures: 1) PagesController GET 'about' returns http success Failure/Error: get 'about' NoMethodError: undefined method `get' for #<RSpec::ExampleGroups::PagesController_2::GETAbout:0x69b85d8> # ./spec/controllers/pages_controller_spec.rb:39:in `block (3 levels) in <top (required)>' 2) PagesController GET 'about' should have the right title Failure/Error: get 'about' NoMethodError: undefined method `get' for #<RSpec::ExampleGroups::PagesController_2::GETAbout:0x69dbb88>...
2012 Dec 01
6
Why does 'extend ActiveSupport::Concern' cause `undefined method 'recycle!'`?
...of an undefined "recycle" method. 12) Qe::Admin::QuestionPagesController POST reorder Failure/Error: xhr :post, :create, NoMethodError: undefined method `recycle!'' for #<Qe::Admin::QuestionPagesController:0x007f80aa1c7528> # ./spec/controllers/admin/pages_controller_spec.rb:69:in `block (2 levels) in <top (required)>'' When I comment out the "include MyEngine::Controller" everything passes. Why? -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send...
2011 Jun 09
1
subdomain based namespacing makes RSpec incorrectly state that the route doesn't exist
...the the RSpec output and the matching line of "rake routes". config/routes.rb: scope :admin, :as => ''admin'', :module => ''admin'', :conditions => { :subdomain => ''admin'' } do resources :pages end spec/controllers/admin/pages_controller_spec.rb: require ''spec_helper'' describe Admin::PagesController do describe "GET index" do context "while not signed-in" do it "should redirect to www.example.com" do get :index # also tried get :index, :subdomain => '...
2011 Nov 25
4
Sprockets File not Found Exception.
...lers/pages_controller.rb route get "pages/contact" route get "pages/home" invoke erb create app/views/pages create app/views/pages/home.html.erb create app/views/pages/contact.html.erb invoke rspec create spec/controllers/pages_controller_spec.rb create spec/views/pages create spec/views/pages/home.html.erb_spec.rb create spec/views/pages/contact.html.erb_spec.rb invoke helper create app/helpers/pages_helper.rb invoke rspec create spec/helpers/pages_helper_spec.rb invoke asset...
2007 Nov 02
5
RSpec, RESTful nested routes and :path_prefix
Dear list, In the app we are making we have a rout something like this: map.resources :projects do |projects| projects.resources :pages, :controller =>"Wiki::Pages", :path_prefix => "/projects/:project_id/ wiki", :name_prefix => "project_wiki_" end But I can''t get RSpec(I''m very new to it) to accept this. It keeps throwing errors:
2008 Aug 11
1
Confused about square bracket usage.
.... To my best understanding, [mock_page] would be an array containing mock_page. That almost makes sense, buy why wouldn''t the variable mock_page simply be an array like @pages. You wouldn''t say [@pages]. I can''t get my head wrapped around the syntax. Thanks in advance. pages_controller_spec.rb def mock_page(stubs={}) @mock_page ||= mock_model(Page, stubs) end describe "responding to GET index" do it "should expose all pages as @pages" do Page.should_receive(:find).with(:all).and_return([mock_page]) get :index assigns[:pages].should...