Note that there are some explanatory texts on larger screens.

plurals
  1. PORuby on Rails 3 Tutorial - Ch. 3; Sec. 3 - "undefined method `describe' for PagesController:Class"
    primarykey
    data
    text
    <p>I am following the code and what the pages say specifically, and the only thing I'm missing is the rspec gem for Ruby on Rails, as I was unable to get it (gives this error for rspec installation: "<strong>E: Unable to locate package rspec</strong>" so any help with that would be <em>greatly</em> appreciated) due to the inability to locate the package.</p> <p>This is my entire pages_controller_spec.rb file, and the error displayed when the rails server tried to connect to the page is displayed in the title (if it's unable to be seen here it is again: "<strong>undefined method `describe' for PagesController:Class</strong>").</p> <p>Note: I have also tried the code without "require 'spec_helper'" and it still will not operate.</p> <pre><code>class PagesController &lt; ApplicationController def home end def contact end def about end require 'spec_helper' describe PagesController do render_views describe "GET 'home'" do it "should be successful" do get 'home' response.should be_success end it "should have the right title" do get 'home' response.should have_selector("title", :content =&gt; "Ruby on Rails Tutorial Sample App | Home") end end describe "GET 'contact'" do it "should be successful" do get 'contact' response.should be_success end it "should have the right title" do get 'contact' response.should have_selector("title", :content =&gt; "Ruby on Rails Tutorial Sample App | Contact") end end describe "GET 'about'" do it "should be successful" do get 'about' response.should be_success end it "should have the right title" do get 'about' response.should have_selector("title", :content =&gt; "Ruby on Rails Tutorial Sample App | About") end end end end </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload