Skip to content

Instantly share code, notes, and snippets.

@janxious
Created February 5, 2012 06:30
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save janxious/1743503 to your computer and use it in GitHub Desktop.
Save janxious/1743503 to your computer and use it in GitHub Desktop.
Y U LOAD RAILS
...
puts "### application loaded ###"
> rails new .
...
> bundle
...
> rails g scaffold micropost content
...
===== put console output code in application.rb =====
===== completely gut controller test; leave only class dec =====
===== put integration stub in place =====
> rake test
### application loaded ###
### application loaded ###
Run options:
# Running tests:
Finished tests in 0.003498s, 0.0000 tests/s, 0.0000 assertions/s.
0 tests, 0 assertions, 0 failures, 0 errors, 0 skips
### application loaded ###
Run options:
# Running tests:
Finished tests in 0.001774s, 0.0000 tests/s, 0.0000 assertions/s.
0 tests, 0 assertions, 0 failures, 0 errors, 0 skips
### application loaded ###
Run options:
# Running tests:
Finished tests in 0.001917s, 0.0000 tests/s, 0.0000 assertions/s.
0 tests, 0 assertions, 0 failures, 0 errors, 0 skips
> rake test:all
### application loaded ###
### application loaded ###
Run options:
# Running tests:
Finished tests in 0.004322s, 0.0000 tests/s, 0.0000 assertions/s.
0 tests, 0 assertions, 0 failures, 0 errors, 0 skips
> time rake test
...
real 0m7.728s
user 0m6.274s
sys 0m1.168s
> time rake test:all
...
real 0m3.726s
user 0m2.970s
sys 0m0.564s
namespace :test do
Rails::SubTestTask.new(:all => "test:prepare") do |t|
t.libs << "test"
t.pattern = 'test/{integration,functional,unit}/**/*_test.rb'
end
end
require 'test_helper'
class MicropostIntegrationTest < ActionController::IntegrationTest
end
task :run => %w(test:units test:functionals test:integration)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment