Created
February 5, 2012 06:30
-
-
Save janxious/1743503 to your computer and use it in GitHub Desktop.
Y U LOAD RAILS
This file contains 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
... | |
puts "### application loaded ###" |
This file contains 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
> 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 |
This file contains 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
> 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 |
This file contains 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
> 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 |
This file contains 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
namespace :test do | |
Rails::SubTestTask.new(:all => "test:prepare") do |t| | |
t.libs << "test" | |
t.pattern = 'test/{integration,functional,unit}/**/*_test.rb' | |
end | |
end |
This file contains 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 'test_helper' | |
class MicropostIntegrationTest < ActionController::IntegrationTest | |
end |
This file contains 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
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