Skip to content

Instantly share code, notes, and snippets.

@berkes
Created February 14, 2012 14:31
Show Gist options
  • Save berkes/1827096 to your computer and use it in GitHub Desktop.
Save berkes/1827096 to your computer and use it in GitHub Desktop.
class SomeBarsController < ApplicationController
def index
return "hi"
end
end
Spree::Core::Engine.routes.append do
resources :some_bars
end
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"}
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