- RailsSpace Book: Starting Chapter 6.
- Ran this: rake db:sessions:create and got this: (p.133)
(in C:/cygwin/home/jasnow/RAILSPASSION/rails_space)
exists db/migrate
create db/migrate/20090505190833_create_sessions.rb - Uncommented one line in config/environment.rb file (p.133)
- Ran this: $ rake db:migrate and got this: (p.133)
(in C:/cygwin/home/jasnow/RAILSPASSION/rails_space)
== 20090505190833 CreateSessions: migrating ===================================
-- create_table(:sessions)
-> 0.1760s
-- add_index(:sessions, :session_id)
-> 0.1570s
-- add_index(:sessions, :updated_at)
-> 0.1740s
== 20090505190833 CreateSessions: migrated (0.5090s) ========================== - Then updated app/controllers/user_controller.rb as specified in Listing 6.1. (p.134)
- Then updated test/functional/user_controller_test.rb as specified in Listing 6.2. (p.135) Got this: 3 tests, 23 assertions, 0 failures, 0 errors
- Then updated app/views/layouts/application.rhtml as specified on Listing 6.3 . (p.135)
- Then updated app/views/layouts/application.rhtml as specified on Listing 6.4 . (p.137)
- Then updated public/stylesheets/site.cs as specified on Listing 6.5. (p.138)
- Then updated app/views/layouts/application.rhtml as specified on Listing 6.6 . (p.139-140)
- Then created app/views/user/login.rthml as specified on Listing 6.7 . (p.140)
- Then updated app/controllers/user_controller.rb as specified in Listing 6.8. (p.141)
- Tried to run it but got "ActionController::InvalidAuthenticityToken in User#register" so I checked the Errata for Chapter 6 and fixed app/controllers/application.rb. (#3). Used foobar/bazquux and logined in successfully.
- Then updated test/functional/user_controller_test.rb as specified on Listing 6.9. (p.143) Got this: 3 tests, 23 assertions, 0 failures, 0 errors
- Then updated test/functional/user_controller_test.rb as specified on Listing 6.10. (p.143-144) Got this: 4 tests, 30 assertions, 0 failures, 0 errors
- Then updated test/functional/user_controller_test.rb as specified on Listing 6.11. (p.144) Got this: 5 tests, 39 assertions, 0 failures, 0 errors
- Then updated app/controllers/user_controller.rb as specified in Listing 6.12. (p.145) Then ran the tests and they worked.
- Then updated app/controllers/user_controller.rb as specified in Listing 6.13. (p.146) Then ran the tests and they worked.
- Then updated app/views/layouts/application.rhtml as specified in Listing 6.14. (p.146-147) Then ran the tests and they worked.
- Then updated test/functional/user_controller_test.rb as specified on Listing 6.15. (p.148) Got this: 1 tests, 5 assertions, 0 failures, 0 errors
- Then updated test/functional/site_controller_test.rb as specified on Listing 6.16. (p.148) Got this: 4 tests, 12 assertions, 0 failures, 0 errors
- Then updated test/functional/user_controller_test.rb as specified on Listing 6.17. (p.149) Got this: 8 tests, 47 assertions, 0 failures, 0 errors
- Then updated test/functional/user_controller_test.rb as specified on Listing 6.18. (p.150) Got this: 9 tests, 50 assertions, 0 failures, 0 errors
- Then updated app/controllers/user_controller.rb as specified in Listing 6.19. (p.150).
- Then updated app/controllers/user_controller.rb as specified in Listing 6.20. (p.151).
- Then updated app/controllers/user_controller.rb as specified in Listing 6.21. (p.152).
- Then updated test/functional/user_controller_test.rb as specified on Listing 6.22. (p.154) Got this: 9 tests, 50 assertions, 0 failures, 0 errors
- Then updated test/functional/user_controller_test.rb as specified on Listing 6.23. (p.154) Got this: 10 tests, 53 assertions, 0 failures, 0 errors
- Then updated test/functional/user_controller_test.rb as specified on Listing 6.24. (p.154) Got this: 11 tests, 55 assertions, 0 failures, 0 errors
- Then updated app/views/layouts/application.rhtml as specified in Listing 6.25. (p.156)
- Then updated app/controllers/user_controller.rb as specified in Listing 6.26. (p.159).
- Then updated app/controllers/user_controller.rb as specified in Listing 6.27. (p.160).
- Then updated app/controllers/user_controller.rb as specified in Listing 6.28. (p.162).
- Then updated test/functional/user_controller_test.rb as specified on Listing 6.29. (p.162) Got this: 12 tests, 61 assertions, 0 failures, 0 errors
- Then updated test/functional/user_controller_test.rb as specified on Listing 6.30. (p.163) Got this: 12 tests, 61 assertions, 0 failures, 0 errors
- START REFACTORING. (p.163)
- Then updated app/helpers/application_helper.rb as specified on Listing 6.31. (p.165)
- Then updated test/functional/user_controller_test.rb as specified on Listing 6.32. (p.165) Got this: 12 tests, 61 assertions, 0 failures, 0 errors (NO CHANGE/GOOD)
- Skipped 6.33. No Change.
- Then updated app/controllers/user_controller.rb as specified in Listing 6.34. (p.166). Got this: 12 tests, 61 assertions, 0 failures, 0 errors (NO CHANGE/GOOD)
- Then updated app/views/layouts/application.rhtml as specified on Listing 6.35 . (p.167)
- Then updated app/views/layouts/application.rhtml as specified on Listing 6.36 . (p.167)
- Ran the test suites and user worked and site did not. Got this for site: $ ruby test/fu*/s*
Loaded suite test/functional/site_controller_test
Started
.........F...
Finished in 0.458 seconds.
1) Failure:
test_register_friendly_url_forwarding(UserControllerTest)
[test/functional/site_controller_test.rb:224:in `test_register_friendly_url_fo
warding'
C:/cygdrive/c/deepdive/InstantRails-2.0-win/ruby/gems/activesupport-2.1.0/lib
active_support/testing/setup_and_teardown.rb:33:in `__send__'
C:/cygdrive/c/deepdive/InstantRails-2.0-win/ruby/gems/activesupport-2.1.0/lib
active_support/testing/setup_and_teardown.rb:33:in `run']:expected but was
<"/user">. - Then updated test/functional/user_controller_test.rb as specified on Listing 6.37. (p.167) Got this: 13 tests, 67 assertions, 1 failures, 0 errors (1 FAILURE)
- Then updated app/controllers/user_controller.rb as specified in Listing 6.38. (p.168). Got this: 13 tests, 67 assertions, 1 failures, 0 errors (1 FAILURE)
- Then updated app/controllers/user_controller.rb as specified in Listing 6.39. (p.169).
- Then updated app/models/user.rb as specified in Listing 6.40. (p.170). Ran user tests and got this: 13 tests, 67 assertions, 1 failures, 0 errors (1 FAILURE)
- Then updated app/models/user.rb as specified in Listing 6.40. (p.170). Ran user tests and got this: 13 tests, 67 assertions, 1 failures, 0 errors (1 FAILURE)
- Then updated app/controllers/user_controller.rb as specified in Listing 6.42. (p.171). Ran user tests and got this: 13 tests, 68 assertions, 0 failures, 0 errors (BACK TO GOOD)
- Then updated app/models/user.rb as specified in Listing 6.43. (p.172). Ran user tests and got this: 13 tests, 68 assertions, 0 failures, 0 errors
- Then updated app/controllers/user_controller.rb as specified in Listing 6.44. (p.173). Ran user tests and got this: 13 tests, 68 assertions, 0 failures, 0 errors
- Then updated app/controllers/user_controller.rb as specified in Listing 6.45. (p.173). Ran user tests and got this: 13 tests, 68 assertions, 0 failures, 0 errors
- Then updated app/models/user.rb as specified in Listing 6.46. (p.174). Ran user tests and got this: 13 tests, 68 assertions, 0 failures, 0 errors
- Then updated app/controllers/user_controller.rb as specified in Listing 6.47, 6.47.5. (p.174).
- Then updated test/functional/user_controller_test.rb as specified on Listing 6.48. (p.175) Got this: 13 tests, 68 assertions, 0 failures, 0 errors
- Then updated app/controllers/user_controller.rb as specified in Listing 6.49. (p.176). Got this: 13 tests, 68 assertions, 0 failures, 0 errors
- Then updated app/controllers/user_controller.rb as specified in Listing 6.50. (p.176-177). Got this: 13 tests, 68 assertions, 0 failures, 0 errors
- Then updated app/controllers/user_controller.rb as specified in Listing 6.51. (p.177). Got this: 13 tests, 68 assertions, 0 failures, 0 errors
- Then updated app/controllers/user_controller.rb as specified in Listing 6.52. (p.177). Got this: 13 tests, 68 assertions, 0 failures, 0 errors
- Finally I did this: $ rake
(in C:/cygwin/home/jasnow/RAILSPASSION/rails_space)
C:/DeepDive/InstantRails-2.0-win/ruby/bin/ruby -I"C:/cygwin/home/jasnow/RAILSPASSION/rails_space/lib" -I"C:/cygwin/home/jasnow/RAILSPASSION/rails_space/test" "C:/cygdrive/c/deepdive/InstantRails-2.0-win/ruby/gems/rake-0.8.4/lib/rake/rake_test_loader.rb" "test/unit/user_test.rb"
Loaded suite C:/cygdrive/c/deepdive/InstantRails-2.0-win/ruby/gems/rake-0.8.4/lib/r
ake/rake_test_loader
Started
............
Finished in 0.342 seconds.
12 tests, 53 assertions, 0 failures, 0 errors
C:/DeepDive/InstantRails-2.0-win/ruby/bin/ruby -I"C:/cygwin/home/jasnow/RAILSPASSIO
N/rails_space/lib" -I"C:/cygwin/home/jasnow/RAILSPASSION/rails_space/test" "C:/cygdrive/c/deepdive/InstantRails-2.0-win/ruby/gems/rake-0.8.4/lib/rake/rake_test_loader.rb" "test/functional/site_controller_test.rb" "test/functional/user_controller_test.rb"
Loaded suite C:/cygdrive/c/deepdive/InstantRails-2.0-win/ruby/gems/rake-0.8.4/lib/r
ake/rake_test_loader
Started
.............
Finished in 0.442 seconds.
13 tests, 68 assertions, 0 failures, 0 errors
C:/DeepDive/InstantRails-2.0-win/ruby/bin/ruby -I"C:/cygwin/home/jasnow/RAILSPASSION/rails_space/lib" -I"C:/cygwin/home/jasnow/RAILSPASSION/rails_space/test" "C:/cygd
rive/c/deepdive/InstantRails-2.0-win/ruby/gems/rake-0.8.4/lib/rake/rake_test_loader
.rb" - Unclear why I have [13, 68, 0, 0] instead of [17, 78, 0, 0] on page 179.
- End of Chapter 6.
Tuesday, May 5, 2009
My RailsSpace Journey - Day 4 (Continued)
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment