Created
February 25, 2012 21:39
-
-
Save andrewhl/1910987 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Running: spec/requests/main_spec.rb | |
Running tests with args ["--color", "--failure-exit-code", "2", "--format", "progress", "--format", "Guard::RSpec::Formatter::NotificationRSpec", "--out", "/dev/null", "--require", "/Users/andrew/.rvm/gems/ruby-1.9.2-p290/gems/guard-rspec-0.5.5/lib/guard/rspec/formatters/notification_rspec.rb", "spec/requests/main_spec.rb"]... | |
..F | |
Failures: | |
1) Main Index page should have a test page path | |
Failure/Error: visit test_path | |
NameError: | |
undefined local variable or method `test_path' for #<RSpec::Core::ExampleGroup::Nested_1::Nested_1:0x00000104d0de78> | |
# ./spec/requests/main_spec.rb:20:in `block (3 levels) in <top (required)>' | |
Finished in 0.46468 seconds | |
3 examples, 1 failure | |
Failed examples: | |
rspec ./spec/requests/main_spec.rb:19 # Main Index page should have a test page path | |
Done. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class MainController < ApplicationController | |
def index | |
end | |
def test | |
end | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'spec_helper' | |
describe "Main" do | |
let(:base_title) { "Leo Baeck Signup System" } | |
describe "Index page" do | |
it "should have the content 'Welcome'" do | |
visit '/main/index' | |
page.should have_content('Welcome') | |
end | |
it "should have the right title" do | |
visit '/main/index' | |
page.should have_selector('title', :text => "#{base_title} | Home") | |
end | |
it "should have a test page path" do | |
visit test_path | |
end | |
end | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SignupSystem::Application.routes.draw do | |
resources :main | |
get "main/test" | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<h1>Test</h1> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment