Permalink
Browse files

Added root route for teaser engine.

Yes, I am adding my database.yml in spec/dummy… it's only ever local…

rake in the engine passes!
rake in the main app still fails :(
  • Loading branch information...
1 parent 6be9b5f commit cd119b41ed0db6ea30a7b4da373b4f03138b43c2 Stephan Hagemann committed Sep 12, 2012
@@ -0,0 +1,6 @@
+module Teaser
+ class TeaseController < ActionController::Base
+ def index
+ end
+ end
+end
@@ -0,0 +1,3 @@
+%h1 The next big Thing
+
+%p Find nothing out about it right here!
@@ -1,2 +1,3 @@
Teaser::Engine.routes.draw do
+ root :to => 'tease#index'
end
@@ -1,4 +1,5 @@
require "teaser/engine"
+require "haml"
module Teaser
end
@@ -0,0 +1,13 @@
+require "spec_helper"
+
+module Teaser
+ describe TeaseController do
+ describe "GET index" do
+ it "should not fail" do
+ expect {
+ get :index, use_route: "teaser"
+ }.to_not raise_exception
+ end
+ end
+ end
+end
@@ -1,55 +1,15 @@
-# PostgreSQL. Versions 8.2 and up are supported.
-#
-# Install the pg driver:
-# gem install pg
-# On Mac OS X with macports:
-# gem install pg -- --with-pg-config=/opt/local/lib/postgresql84/bin/pg_config
-# On Windows:
-# gem install pg
-# Choose the win32 build.
-# Install PostgreSQL and put its /bin directory on your path.
-#
-# Configure Using Gemfile
-# gem 'pg'
-#
development:
adapter: postgresql
encoding: unicode
- database: dummy_development
+ database: teaser_development
pool: 5
- username: dummy
+ username: stephan.hagemann
password:
- # Connect on a TCP socket. Omitted by default since the client uses a
- # domain socket that doesn't need configuration. Windows does not have
- # domain sockets, so uncomment these lines.
- #host: localhost
- #port: 5432
-
- # Schema search path. The server defaults to $user,public
- #schema_search_path: myapp,sharedapp,public
-
- # Minimum log levels, in increasing order:
- # debug5, debug4, debug3, debug2, debug1,
- # log, notice, warning, error, fatal, and panic
- # The server defaults to notice.
- #min_messages: warning
-
-# Warning: The database defined as "test" will be erased and
-# re-generated from your development database when you run "rake".
-# Do not set this db to the same as development or production.
test:
adapter: postgresql
encoding: unicode
- database: dummy_test
- pool: 5
- username: dummy
- password:
-
-production:
- adapter: postgresql
- encoding: unicode
- database: dummy_production
+ database: teaser_test
pool: 5
- username: dummy
+ username: stephan.hagemann
password:
@@ -0,0 +1,16 @@
+# encoding: UTF-8
+# This file is auto-generated from the current state of the database. Instead
+# of editing this file, please use the migrations feature of Active Record to
+# incrementally modify your database, and then regenerate this schema definition.
+#
+# Note that this schema.rb definition is the authoritative source for your
+# database schema. If you need to create the application database on another
+# system, you should be using db:schema:load, not running all the migrations
+# from scratch. The latter is a flawed and unsustainable approach (the more migrations
+# you'll amass, the slower it'll run and the greater likelihood for issues).
+#
+# It's strongly recommended to check this file into your version control system.
+
+ActiveRecord::Schema.define(:version => 0) do
+
+end
@@ -1,38 +1,14 @@
# This file is copied to spec/ when you run 'rails generate rspec:install'
ENV["RAILS_ENV"] ||= 'test'
-require File.expand_path("../../config/environment", __FILE__)
+require File.expand_path("../dummy/config/environment", __FILE__)
require 'rspec/rails'
require 'rspec/autorun'
-# Requires supporting ruby files with custom matchers and macros, etc,
-# in spec/support/ and its subdirectories.
Dir[Rails.root.join("spec/support/**/*.rb")].each {|f| require f}
RSpec.configure do |config|
- # ## Mock Framework
- #
- # If you prefer to use mocha, flexmock or RR, uncomment the appropriate line:
- #
- # config.mock_with :mocha
- # config.mock_with :flexmock
- # config.mock_with :rr
-
- # Remove this line if you're not using ActiveRecord or ActiveRecord fixtures
config.fixture_path = "#{::Rails.root}/spec/fixtures"
-
- # If you're not using ActiveRecord, or you'd prefer not to run each of your
- # examples within a transaction, remove the following line or assign false
- # instead of true.
config.use_transactional_fixtures = true
-
- # If true, the base class of anonymous controllers will be inferred
- # automatically. This will be the default behavior in future versions of
- # rspec-rails.
config.infer_base_class_for_anonymous_controllers = false
-
- # Run specs in random order to surface order dependencies. If you find an
- # order dependency and want to debug it, you can fix the order by providing
- # the seed, which is printed after each run.
- # --seed 1234
config.order = "random"
end

0 comments on commit cd119b4

Please sign in to comment.