Note that there are some explanatory texts on larger screens.

plurals
  1. PORails error in test driven development
    primarykey
    data
    text
    <p>I am following the tutorial of <a href="http://ruby.railstutorial.org" rel="nofollow">Michael Harlt</a> .And i am a newbie of web development.</p> <p>SO i am facing many error while writing test . I am sharing the errors log and i have searched a on internet and looked a lot toward my code but not getting what is the error so please help me i am sharing both the code and the error log. <br> Code of spec file.`</p> <pre><code>require 'spec_helper' describe "Static pages" do subject{ page } describe "Home page" do before {visit root_path} it { should have_selector('h1', text: 'Sample App')} it {should have_selector ('title', text: full_title(''))} it { should_not have_selector 'title', text: '|Home'} end describe "Help page" do before {visit help_path} it { should have_selector('h1', text:'Help')} it { should have_selector('title', text: full_title('Help'))} end describe "About page"do before {visit about_path} it {should have_selector('h1', text:'About')} it {should have_selector('title', text: full_title('About US'))} end describe "Contact page" do before { visit contact_path} it {should have_selector('h1', text:'Contact')} it{should have_selector('title', text: full_title('Contact'))} end end </code></pre> <p>Code for the methode <code>full_title()</code> <br></p> <pre><code> module ApplicationHelper def full_title(page_title) base_title="Ruby on Rails Tutorial Sample App" if page_title.empty? base_title else "#{base_title} | #{page_title} " end end end </code></pre> <p>And the error log is</p> <p>after executing command bundle exec rspec spec/requests/static_pages_spec.rb</p> <p><code>it {should have_selector('title',title: full_title(''))} ^</code></p> <p><strong>C:/sample_app/spec/request/static_pages_spec.rb:15 syntax error,unexpected keyword_end,expecting '}'</strong><br> <strong>**C:/sample_app/spec/request/static_pages_spec.rb:15 syntax error,unexpected keyword_end,expecting '}'**</strong></p> <p><br>spec_helper file for @spullen</p> <pre><code>require 'spec_helper' describe StaticPagesHelper do pending "add some examples to (or delete) #{__FILE__}" end </code></pre>
    singulars
    1. This table or related slice is empty.
    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.
    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