Created
February 14, 2012 14:31
-
-
Save berkes/1827096 to your computer and use it in GitHub Desktop.
This file contains hidden or 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 SomeBarsController < ApplicationController | |
def index | |
return "hi" | |
end | |
end |
This file contains hidden or 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
Spree::Core::Engine.routes.append do | |
resources :some_bars | |
end |
This file contains hidden or 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
1) SomeBarsController GET 'index' should be successful | |
Failure/Error: get 'index' | |
ActionController::RoutingError: | |
No route matches {:controller=>"some_bars"} | |
2) SomeBarsController GET 'index' should render Hello World | |
Failure/Error: get 'index' | |
ActionController::RoutingError: | |
No route matches {:controller=>"some_bars"} |
This file contains hidden or 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 SomeBarsController do | |
describe "GET 'index'" do | |
it "should be successful" do | |
get 'index' | |
response.should be_success | |
end | |
it "should render Hello World" do | |
get 'index' | |
response.should contain("Hello World!") | |
end | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment