Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

symlink shared parts of app_root, colorize spec output, remove log files

  • Loading branch information...
commit 677443698eb9ad41ff438de7138e1f28d71e0deb 1 parent 78a1d49
@henning-koch henning-koch authored
View
2  .gitignore
@@ -2,7 +2,7 @@ doc
pkg
*.gem
.idea
-spec/app_root/log/*
+spec/**/app_root/log/*
Gemfile.lock
View
8 Rakefile
@@ -7,10 +7,8 @@ task :default => :all_specs
desc "Run all specs"
task :all_specs do
Dir['spec/**/Rakefile'].each do |rakefile|
- directory_name = File.dirname(rakefile)
- sh <<-CMD
- cd #{directory_name}
- bundle exec rake
- CMD
+ directory = File.dirname(rakefile)
+ puts '', "\033[44m#{directory}\033[0m", ''
+ system("cd #{directory} && bundle exec rake")
end
end
View
1  spec/rspec1/app_root/app
View
2  spec/rspec1/app_root/app/controllers/application_controller.rb
@@ -1,2 +0,0 @@
-class ApplicationController < ActionController::Base
-end
View
2  spec/rspec1/app_root/app/models/model.rb
@@ -1,2 +0,0 @@
-class Model < ActiveRecord::Base
-end
View
1  spec/rspec1/app_root/db
View
12 spec/rspec1/app_root/db/migrate/001_create_model.rb
@@ -1,12 +0,0 @@
-class CreateModel < ActiveRecord::Migration
-
- def self.up
- create_table :models do |t|
- end
- end
-
- def self.down
- drop_table :models
- end
-
-end
View
4 spec/rspec1/app_root/lib/console_with_fixtures.rb
@@ -1,4 +0,0 @@
-# Loads fixtures into the database when running the test app via the console
-(ENV['FIXTURES'] ? ENV['FIXTURES'].split(/,/) : Dir.glob(File.join(Rails.root, '../fixtures/*.{yml,csv}'))).each do |fixture_file|
- Fixtures.create_fixtures(File.join(Rails.root, '../fixtures'), File.basename(fixture_file, '.*'))
-end
View
7 spec/rspec1/app_root/script/console
@@ -1,7 +0,0 @@
-irb = RUBY_PLATFORM =~ /(:?mswin|mingw)/ ? 'irb.bat' : 'irb'
-libs = " -r irb/completion"
-libs << " -r test/test_helper"
-libs << " -r console_app"
-libs << " -r console_with_helpers"
-libs << " -r console_with_fixtures"
-exec "#{irb} #{libs} --simple-prompt"
View
2  spec/rspec1/spec_helper.rb
@@ -14,7 +14,9 @@
silence_warnings {RAILS_ENV = ENV['RAILS_ENV']}
# Run the migrations
+print "\033[30m" # dark gray text
ActiveRecord::Migrator.migrate("#{Rails.root}/db/migrate")
+print "\033[0m"
Spec::Runner.configure do |config|
config.use_transactional_fixtures = true
View
1  spec/rspec2/Rakefile
@@ -6,5 +6,6 @@ task :default => :spec
desc "Run all specs for a specific rails version"
RSpec::Core::RakeTask.new(:spec) do |t|
+ t.verbose = false
t.pattern = ['**/*_spec.rb', '../shared/**/*_spec.rb']
end
View
1  spec/rspec2/app_root/app
View
1  spec/rspec2/app_root/db
View
0  spec/rspec2/app_root/lib/tasks/.gitkeep
No changes.
View
6 spec/rspec2/app_root/script/rails
@@ -1,6 +0,0 @@
-#!/usr/bin/env ruby1.8
-# This command will automatically be run when you run "rails" with Rails 3 gems installed from the root of your application.
-
-APP_PATH = File.expand_path('../../config/application', __FILE__)
-require File.expand_path('../../config/boot', __FILE__)
-require 'rails/commands'
View
33 spec/rspec2/log/in_memory.log
@@ -1,33 +0,0 @@
- SQL (0.3ms)  SELECT name
- FROM sqlite_master
- WHERE type = 'table' AND NOT name = 'sqlite_sequence'
-
- SQL (0.1ms) select sqlite_version(*)
- SQL (0.2ms) CREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL) 
- SQL (0.0ms) PRAGMA index_list("schema_migrations")
- SQL (0.1ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
- SQL (0.1ms) SELECT name
- FROM sqlite_master
- WHERE type = 'table' AND NOT name = 'sqlite_sequence'
- SQL (0.3ms)  SELECT name
- FROM sqlite_master
- WHERE type = 'table' AND NOT name = 'sqlite_sequence'
-
- SQL (0.1ms) select sqlite_version(*)
- SQL (0.2ms) CREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL) 
- SQL (0.0ms) PRAGMA index_list("schema_migrations")
- SQL (0.1ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
- SQL (0.1ms) SELECT name
- FROM sqlite_master
- WHERE type = 'table' AND NOT name = 'sqlite_sequence'
- SQL (0.3ms)  SELECT name
- FROM sqlite_master
- WHERE type = 'table' AND NOT name = 'sqlite_sequence'
-
- SQL (0.1ms) select sqlite_version(*)
- SQL (0.2ms) CREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL) 
- SQL (0.0ms) PRAGMA index_list("schema_migrations")
- SQL (0.1ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
- SQL (0.1ms) SELECT name
- FROM sqlite_master
- WHERE type = 'table' AND NOT name = 'sqlite_sequence'
View
2  spec/rspec2/spec_helper.rb
@@ -15,7 +15,9 @@
silence_warnings {RAILS_ENV = ENV['RAILS_ENV']}
# Run the migrations
+print "\033[30m" # dark gray text
ActiveRecord::Migrator.migrate("#{Rails.root}/db/migrate")
+print "\033[0m"
RSpec.configure do |config|
config.use_transactional_fixtures = true
View
0  ...app/controllers/application_controller.rb → ...app/controllers/application_controller.rb
File renamed without changes
View
0  spec/rspec2/app_root/app/models/model.rb → spec/shared/app_root/app/models/model.rb 100644 → 100755
File renamed without changes
View
0  ...2/app_root/db/migrate/001_create_model.rb → ...d/app_root/db/migrate/001_create_model.rb 100644 → 100755
File renamed without changes
Please sign in to comment.
Something went wrong with that request. Please try again.