rails-dev-box
-
$ vagrant suspend
suspend VM -
$ vagrant resume
hack again -
$ vagrant halt
shut down -
$ vagrant up
boot it again -
$ vagrant status
check status -
$ vagrant destroy # DANGER: all is gone
wipe the virtual machine from the disk destroying all its contents
Tests
- Runnning single test separately
$ ARCONN=sqlite3 ruby -Itest test/cases/associations/has_many_associations_test.rb -n test_something_working
-
--name "full name with spaces"
or--name /with/
whentest 'something' do … end
syntax -
-v
after the file name will output the test name
- Run tests
$ bundle exec rake test
- Run sqlite tests(activerecord)
$ bundle exec rake test_sqlite3
- Others are
test_mysql
,test_mysql2
,test_postgresql
- Run tests without warnings
$ RUBYOPT=-W0 bundle exec rake test
ActiveRecord
Thread
wtf is it :P
::Persistence
- private method,
update_record
andcreate_update
are the key methods
::Scoping
::Default
-
relation
seems to be important.