Ruby on Rails/Âè15²óÊÙ¶¯²ñ - ǧ¾Ú¥×¥é¥°¥¤¥óActs as Authenticated¤Ë¤Ä¤¤¤Æ

¤É¤¦¤â¡¢SE¤Î¾®¾Â¤Ç¤¹¡£

[edit]

¤³¤Î¥Ú¡¼¥¸¤Ï¡©

²¼µ­¤Î¥Í¥¿¤ò¸µ¤ËRspec¤Ë¤Ä¤¤¤ÆÊÙ¶¯¤·¤Æ¤ß¤ë¥Ú¡¼¥¸¤Ç¤¹¡£

º£²ó¤ÏÂ裳²ó¤È¤¤¤¦¤³¤È¤ÇÁ°²ó¤Þ¤Ç¤Î³¤­¤Ç¤¹¡£
Á°²ó¤ÇRspec¤Î»È¤¤Êý¤Þ¤Ç¤ò¤´ÀâÌÀ¤·¤Þ¤·¤¿¡£
º£²ó¤ÏRspec¤òRuby on Rails¾å¤Ç»È¤¦ÊýË¡¤ò¤´¾Ò²ð¤·¤Þ¤¹¡£

[edit]

Æ°²è

http://www.screencast.com/t/b4eymGMn

[edit]

Ìܼ¡

[edit]

Æü»þ

[edit]

»²²Ã¼Ô

[edit]

Æ°²è

[edit]

ËÜÊÔ

[edit]

¥¤¥ó¥¹¥È¡¼¥ë

$ ./script/plugin install svn://rubyforge.org/var/svn/rspec/tags/REL_1_0_8/rspec
...ά...
$ ./script/plugin install svn://rubyforge.org/var/svn/rspec/tags/REL_1_0_8/rspec_on_rails
...ά...
[edit]

ɬÍפʥե¡¥¤¥ë¤ÎÀ¸À®

[edit]

¥µ¥ó¥×¥ë¤òÆ°¤«¤·¤Æ¤ß¤ë

[edit]

º£²ó¤Î¥µ¥ó¥×¥ë¤Ë¤Ä¤¤¤Æ

[edit]

½àÈ÷

[edit]

¥â¥Ç¥ë¤Î³«È¯

¥â¥Ç¥ë¤Î¥Ó¥Ø¥¤¥Ó¥¢¶îÆ°³«È¯¤Ï°Ê²¼¤Î¤è¤¦¤Ê¥Õ¥í¡¼¤Ë¤Ê¤ë¡£

[edit]

½ÅÍפÊÅÀ

change ¥Þ¥Ã¥Á¥ã
½èÍý¤Î¼Â¹ÔÁ°¤È¼Â¹Ô¸å¤Ç¤ÎÊѲ½¤òÄêµÁ¤¹¤ë¥Þ¥Ã¥Á¥ã

lambda {
  team.add_player(player)
}.should change(roster, :count)
//team¤Ëadd_player¤¹¤ë¤Èteam¤Îcout¤ÎÃͤ¬ÊѲ½¤¹¤ë¤È¤¤¤¦¤³¤È¤òÄêµÁ

°Ê²¼¤Î¤è¤¦¤Ê»È¤¤Êý¤¬²Äǽ

[edit]

ÌäÂê

/home/staff/konuma/test/rails/rspec_test/vendor/plugins/rspec_on_rails/lib/spec/rails/extensions/action_controller/rescue.rb:19: undefined method `alias_method_chain' for ActionController::Rescue:Module (NoMethodError)

   from /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `require'
   from /usr/lib/ruby/gems/1.8/gems/activesupport-1.3.1/lib/active_support/dependencies.rb:147:in `require'
   from /home/staff/konuma/test/rails/rspec_test/vendor/plugins/rspec_on_rails/lib/spec/rails/extensions.rb:6
   from /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `require'
   from /usr/lib/ruby/gems/1.8/gems/activesupport-1.3.1/lib/active_support/dependencies.rb:147:in `require'
   from /home/staff/konuma/test/rails/rspec_test/config/../vendor/plugins/rspec_on_rails/lib/spec/rails.rb:17
   from /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `require'
   from /usr/lib/ruby/gems/1.8/gems/activesupport-1.3.1/lib/active_support/dependencies.rb:147:in `require'
   from ./spec/models/../spec_helper.rb:5
   from /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `require'
   from ./spec/models/blog_spec.rb:1
   from /home/staff/konuma/test/rails/rspec_test/vendor/plugins/rspec/lib/spec/runner/behaviour_runner.rb:106:in `load_specs'
   from /home/staff/konuma/test/rails/rspec_test/vendor/plugins/rspec/lib/spec/runner/behaviour_runner.rb:105:in `load_specs'
   from /home/staff/konuma/test/rails/rspec_test/vendor/plugins/rspec/lib/spec/runner/behaviour_runner.rb:49:in `prepare!'
   from /home/staff/konuma/test/rails/rspec_test/vendor/plugins/rspec/lib/spec/runner/behaviour_runner.rb:19:in `run'
   from /home/staff/konuma/test/rails/rspec_test/vendor/plugins/rspec/lib/spec/runner/command_line.rb:17:in `run'
[edit]

¤Þ¤È¤á

Åê¹Æ¼Ô¾®¾Â | ¥Ñ¡¼¥Þ¥ê¥ó¥¯

| append.gif

tag: Ruby on Rails, ÊÙ¶¯²ñ,¥Æ¥¹¥È


¥È¥Ã¥×   ¿·µ¬ °ìÍ÷ ñ¸ì¸¡º÷ ºÇ½ª¹¹¿·   ¥Ø¥ë¥×   ºÇ½ª¹¹¿·¤ÎRSS

¥¢¡¼¥¯¥¦¥§¥Ö¤Î¥µ¡¼¥Ó¥¹¤ä¥½¥ê¥å¡¼¥·¥ç¥ó¤Ï¤³¤Á¤é