| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
| |
Speed up depends on the number of test phases (N) you have for your
app, but it is roughly a 1/N improvement. In my app, it goes from
15.51s to 5.56s.
Inspired by http://ngauthier.com/2012/02/quick-tests-with-bash.html
Reviewed by @tenderlove
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Sometimes your git directory is an ancestor of your application root
directory.
For example:
./repo/.git/
./repo/app/Rakefile
In this case rake test:uncommitted will be unable to detect your SCM.
This patch fixes this and add a test.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Change the default test locations to avoid confusion around the common
testing terms "unit" and "functional".
Add new rake tasks for the new locations, while maintaining backwards
compatibility with the old rake tasks.
New testing locations are as follows:
app/models -> test/models (was test/units)
app/helpers -> test/helpers (was test/units/helpers)
app/controllers -> test/controllers (was test/functional)
app/mailers -> test/mailers (was test/functional)
|
|
|
|
|
|
|
|
|
|
|
| |
This reverts commit abf8de85519141496a6773310964ec03f6106f3f.
We should take a deeper look to those cases flat_map doesn't do deep
flattening.
irb(main):002:0> [[[1,3], [1,2]]].map{|i| i}.flatten
=> [1, 3, 1, 2]
irb(main):003:0> [[[1,3], [1,2]]].flat_map{|i| i}
=> [[1, 3], [1, 2]]
|
| |
|
| |
|
|
|
|
|
|
| |
Partially reverts 14c89e7285d4e7cd40a542fbc31d9345f60c3aa4.
Hat tip to @tenderlove for paring down the TestTask!
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add your own test tasks as dependencies on the `test:run` task instead of `test` itself.
namespace :test do
task run: 'test:acceptance'
Rails::SubTestTask.new acceptance: 'test:prepare' do |t|
t.libs << 'test'
t.pattern = 'test/acceptance/**/*_test.rb'
end
end
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
TestTaskWithoutDescription.
This makes it easier to add your own tests to the default suite:
task test: 'test:acceptance'
namespace :test do
Rails::SubTestTask.new acceptance: 'test:prepare' do |t|
t.libs << 'test'
t.pattern = 'test/acceptance/**/*_test.rb'
end
end
Now `rake` runs unit, functional, integration, and acceptance tests.
|
|
|
| |
Thanks to @sobrinho (Gabriel Sobrinho)
|
|
|
|
|
|
| |
I found this bug when running rake test:uncommitted
on a newly generated rails app which don't have
test file for application_controller.
Can see detail here #3461
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
| |
[#3572 state:resolved]
Signed-off-by: Xavier Noria <fxn@hashref.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
from railties.
With config.generators becomes a way to configure generators
for current instance only. For example:
module Blog
class Engine < Rails::Engine
config.generators do |g|
g.orm :active_record
end
config.app_generators do |g|
g.test_framework :rspec
end
end
end
such definition sets :active_record as orm for engine and :rspec
as test_framework for application. The values set with app_generators
can be overwritten in application using config.generators as you would
normally do:
module MyApp
class Application < Rails::Application
config.generators do |g|
g.test_framework :test_unit
end
end
end
|
| |
|
|
|
|
|
|
| |
state:committed]
Signed-off-by: Santiago Pastorino <santiago@wyeworks.com>
|
|
|
|
| |
not "ActiveRecord"
|
| |
|
|
|
|
| |
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
|
|
|
|
| |
specified in railties/engines/rails. [#4471 state:resolved]
|
|
|
|
| |
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
|
| |
|
|
|
|
| |
remove railtie_name and engine_name and allow to set the configuration object.
|
|
|
|
| |
initializers
|
| |
|
| |
|
| |
|
| |
|
|
|