Hi Ryan,
I think there is a problem with the screencast today, I don't seem to be able to download or view it. Nobody else has commented, so I thought I better :-)
@Gavin, Yes, me too! Initially I thought it might be a local problem or perhaps i was trying to pull it a bit too soon but it seems like something is missing on Ryan's end.
@Ryan, waiting patiently.
Cheers,
Aditya
I'm unable to download the screencasts, too. Seems that the media server is down.
No problems at all here.
Great 'cast Ryan - as a bonus you may want to add a link to Ben Mabey's presentation at MountainWest RubyConf
http://mwrc2009.confreaks.com/14-mar-2009-15-00-bdd-with-cucumber-ben-mabey.html
^^ I like how he breaks everything down
Great introduction to cucumber! I already knew the framework and noticed, that you're pointing out the power of it very clear. A great starting-point for your audience.
Cheers,
Florian
Hey Ryan,
This looks great! One question I had, is this something that can replace shoulda? I know you said to do continue doing unit tests - so is this something I use in combination with shoulda (like your use of rspec)?
Working for me now too. :-) Wow, Cucumber is really impressive, I've been quite intimidated by the various Rails testing methodologies but this seems quite friendly.
Great cast!
Maybe next week you can cover Cucumber with Ajax?
Keep up the good work!
Sorry about the download problems guys. Dreamhost has been a little flaky lately. May be time to find a mirror for when this happens.
@pimpmaster, good idea! I knew I forgot some other resource links. I'll add it.
@Jay, Cucumber is most often used with RSpec, but it isn't tied directly to any testing framework. You can definitely use Shoulda with it instead.
@Anlek, I plan to do more Cucumber testing episodes in the future, but not yet sure on the specific topics. Thanks for the suggestion.
Test::Unit::TestCase ... I mean ActiveSupport::TestCase for life!
Am I the only one who find these testing frameworks extremely annoying?
Cucumber is a similar but improved way of "plain text stories"
http://blog.davidchelimsky.net/articles/2007/10/22/plain-text-stories-on-rails
and also integrates them.
In my opinion BDD (using cucumber) is the best way to test a rails application and present the result to a customer (which may not be familiar with programming).
Very nice screen-cast. I'm hoping to see more BDD screen-casts in the future, especially about Cucumber and RSpec.
Thanks!
Hi Ryan,
Cracking Screencast this week - but here's a bit of an OT question - in this you're using the Rails bundle for textmate, yet you appear to have different shortcuts to the one I have - for instance forin and field are missing from mine - where did you get yours from?
Really good introduction to BDD. I'm gonna show your screencast to the rest of my team since I already wanted to convince them about Cucumber.
Well done again,
and thanks.
Attila
Thank you for this useful and timely cast.
I'd like to see one about RSpec replacing Test::Unit.
That is so cool, Ryan! Just again when I needed an introduction to cucumber you come around with another screencast (was similar back with Liquid)!
All praise our mighty voice from beyond! ;)
Thanks, Ryan. Terrific intro that really helped me begin to wrap my head around Cucumber.
Seems like a great way to build a rock solid Rails apps from the bottom-up.
As always, superlative work.
Very interesting. Keep it up Ryan. Can you please make a screen cast on Globalize 2.
I've been using Watir (Web Application Testing in Watir) for a while now. I've found that when testing javascript applicaitons, the combination of Cucumber/SafariWatir/Safari4.0 is very fluid and very fast.
@Neil, you can find those shortcuts in my textmate bundle.
http://github.com/ryanb/ryan-on-rails.tmbundle/
Markus:
Or Outside-In as we say in BDD land :-)
Hey, thanks for this Ryan. It's a really great intro to Cuke.
@Rich mentioned using Cuke with Watir. I've seen a bit about this but would love to find out a little more about this and about using Cuke with Selenium.
This is a pretty neat intro to Cuke w/ Watir: http://www.vimeo.com/2871256 but it aint no Railscast!
Great screencast. Just what I need but I'm having problems installing rpsec and rspec-rails. When I install the gems I get: Could not find main page README.rdoc
Cucumber and Webrat installed just fine though. Any ideas? I'm on leopard.
Hi Ryan,
I was just wondering how you would go about defining a resource route using the paths case statement.
For example:
When I go to Bitstar Media's project Computer Science show page
http://pastie.org/437618
I am having alot of trouble getting this type of functionality with Cucumber. Any tips?
(not related)
I am having issues with a rails app that I am sure is fairly trivial. I generated a generic scaffold, implemented restful_auth per your instructions, and mucked around with the layout. Now I have discovered my named route new_todo_path doesn't work anymore it points to /todo/new which makes the url localhost/todo//todo/new or localhost//todo/new because I had set todo as the root controller in my routing file. Any ideas? All other routes work fine. Another strange thing is if I manually go to localhost/todo/new it creates a record without me even submitting the form.
I have setup Cucumber as outlined in the Railscast. Cucumber on a Windows Vista System console does not show correct (ansi escape coded) colors.
How to setup Windows Vista Home Premium w Rails 2.3, cucumber, rspec,
rspec-rails, webrat for proper Cucumber console colors.
Superb intro to Cucumber. Many thanks.
Ken Wagner
@Kenneth:
Try to use this tutorial to install Cygwin as a Unix-like terminal:
Cygwin Info: http://en.wikipedia.org/wiki/Cygwin
Tutorial for rails: http://phaseshiftllc.com/archives/2008/10/02/setting-up-rails-on-windows-with-cygwin
- Florian
I just installed all this and the default webrat file was missing the go to method (amongst others). Also didn't have the routes file, either.
I lifted them from your git repository and then webrat started complaining that it wasn't configured properly and needed
Webrat.configure do |config|
config.mode = :rails
end
Suspect the gems have moved on but as usual the documentation doesn't tell you.
Ryan, you are a really mean guy, you know? I wanted to use the easter weekend to get forward with my app, but I guess, now I'm gonna play around with cukes all day long. ;)
missing in your code listing:
# config/routes.rb
map.resource :articles
ups... should be:
# config/routes.rb
map.resources :articles
OK, repeated you tutorial. Just started with Rails and wanted to check out a good TDD scheme for Ruby and found Cucumber & RSpec. The homepages are nice for experts, but not a single step-by-step guide for getting it to work for newbs. Especially the rake commands are given NOWHERE and as a newb the problem with tables reported by Cucumber (if you don't know you need to clone) and the official Cucumber Wiki example actually using a table in the feature got me going crazy... Your railscast on this should become part of the official documentation! Thanks loads, man!!!
Great screencast as always!!
I am new to BDD and am trying to figure out when it is that one would use rspec in this process? After the Cucumber features pass? Would rspec just get used for unit testing at that point?
Thanks again!
Eric
Hi,
for all windows (Netbeans) developers:
I've written a Module for Netbeans which allows "Syntax Highlighting" and more for .feature files.
So if you are interested in it, you can find it on the Netbeans homepage:
http://plugins.netbeans.org/PluginPortal/faces/PluginDetailPage.jsp?pluginid=17939
or on my homepage:
http://members.chello.at/server/modules.html
Thanks once again for your railscasts, Ryan!
I'm now learning cucumber and found your explanations very concise and helpful. :)
Thanks for the great Railscasts...
I had trouble installing webrat on ubuntu until I installed the required packages described on this page http://wiki.rubyonrails.org/testing/webrat#installation
-- Jean-Marc
If you are new and following along at home with a newer version of Cucumber (I've got 0.3.5), the -n switch for the "cucumber features" command will generate an error. Apparently -n refers to a different option in later versions, and the current equivalent is "--no-source".
Love these testing screencasts, Ryan! They are the only comprehensive source I've seen that walks through using all of the tools together to write tests for and code for a vaguely realistic Rails app, without assuming I am already a testing wizard.
Thank you for bringing us this information, I truly did appreciate the good work.
Hey Guys,
Don't panic if you are getting below error when you tried to run "cucumber features -n":
missing argument: -n (OptionParser::MissingArgument)
You are getting this error because cucumber version is now updated.
Try to run "cucumber features" and it will work fine!!!
Hi,
First of all thanks for making this tutorial, someone told me it was a good one to learn from.
Here's my current problem
~/www/blog$ cucumber features -n
bash: cucumber: command not found
Any idea what i can do ? i haven't been able to find a fix on Google ( perhaps i was searching improperly )
I have posted a version for people with Ubuntu 9.04 to give this a shot. I hope you guys dont mind. I did give credit at the top of the post.
http://aslambilal.blogspot.com/2009/06/beginning-with-cucumber-for-ubuntu-904.html
Great introduction to cucumber! I already knew the framework and noticed, that you're pointing out the power of it very clear. A great starting-point for your audience.
I'm unable to download the screencasts, too. Seems that the media server is down.
I've created a custom formatter that generates better HTML output for use with your cucumber projects and textmate
I've created a custom formatter that generates better HTML output for use with your cucumber projects and textmate
http://github.com/raldred/cucumber_textmate/tree/master
These are excellent tips on creating a buzzing community. I particularly like No. 11 which mentions counting the number of shared experiences rather than the users. Very true indeed. This is exactly how a good community grows.
I'm new here. Love it already.
Reply
I just installed Cucumber and Ruby on Rails on a Fedora 12 virtual machine. I am having the following issue complaining about jopenssl. Any ideas what could be wrong? Thanks
[root@bldr-vcm25 blog]# rake gems:install RAILS_ENV=test --trace
(in /home/aavella/Documents/blog)
** Invoke gems:install (first_time)
** Invoke gems:base (first_time)
** Execute gems:base
** Invoke environment (first_time)
** Execute environment
rake aborted!
no such file to load -- jopenssl
/usr/local/lib/ruby/gems/1.8/gems/rails-2.3.4/lib/initializer.rb:271:in `require_frameworks'
/usr/local/lib/ruby/gems/1.8/gems/rails-2.3.4/lib/initializer.rb:134:in `process'
/usr/local/lib/ruby/gems/1.8/gems/rails-2.3.4/lib/initializer.rb:113:in `send'
/usr/local/lib/ruby/gems/1.8/gems/rails-2.3.4/lib/initializer.rb:113:in `run'
/home/aavella/Documents/blog/config/environment.rb:9
/usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require'
/usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `require'
/usr/local/lib/ruby/gems/1.8/gems/activesupport-2.3.4/lib/active_support/dependencies.rb:156:in `require'
/usr/local/lib/ruby/gems/1.8/gems/activesupport-2.3.4/lib/active_support/dependencies.rb:521:in `new_constants_in'
/usr/local/lib/ruby/gems/1.8/gems/activesupport-2.3.4/lib/active_support/dependencies.rb:156:in `require'
/usr/local/lib/ruby/gems/1.8/gems/rails-2.3.4/lib/tasks/misc.rake:4
/usr/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:636:in `call'
/usr/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:636:in `execute'
/usr/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:631:in `each'
/usr/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:631:in `execute'
/usr/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:597:in `invoke_with_call_chain'
/usr/local/lib/ruby/1.8/monitor.rb:242:in `synchronize'
/usr/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:590:in `invoke_with_call_chain'
/usr/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:583:in `invoke'
/usr/local/lib/ruby/gems/1.8/gems/rails-2.3.4/lib/tasks/gems.rake:17
/usr/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:636:in `call'
/usr/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:636:in `execute'
/usr/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:631:in `each'
/usr/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:631:in `execute'
/usr/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:597:in `invoke_with_call_chain'
/usr/local/lib/ruby/1.8/monitor.rb:242:in `synchronize'
/usr/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:590:in `invoke_with_call_chain'
/usr/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:607:in `invoke_prerequisites'
/usr/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:604:in `each'
/usr/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:604:in `invoke_prerequisites'
/usr/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:596:in `invoke_with_call_chain'
/usr/local/lib/ruby/1.8/monitor.rb:242:in `synchronize'
/usr/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:590:in `invoke_with_call_chain'
/usr/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:583:in `invoke'
/usr/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2051:in `invoke_task'
/usr/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2029:in `top_level'
/usr/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2029:in `each'
/usr/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2029:in `top_level'
/usr/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2068:in `standard_exception_handling'
/usr/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2023:in `top_level'
/usr/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2001:in `run'
/usr/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2068:in `standard_exception_handling'
/usr/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:1998:in `run'
/usr/local/lib/ruby/gems/1.8/gems/rake-0.8.7/bin/rake:31
/usr/local/bin/rake:19:in `load'
/usr/local/bin/rake:19
[root@bldr-vcm25 blog]#
Jeg er ny til BDD og jeg forsøger at finde ud af, når det er, at man ville bruge rspec i denne proces?
Just started with Rails and wanted to check out a good TDD scheme for Ruby and found Cucumber & RSpec.
Your article is very good.I like it very much.
www.eshooes.com
Thanks for the great screencast, Ryan.
Note:
From Cucumber 0.4.5 and onwards you will also need to install the 'cucumber-rails' gem, or else 'script/generate cucumber' will fail.
瑞安非常感谢,你是我们的英雄!<a href= http://www.crazypurchase.com>中国批发“/为一大<a href= http://www.crazypurchase.com>cell phones</a>截屏”谢谢!
FYI, as of cucumber-0.4.2 you'll need to use cucumber-rails otherwise the generators wont work.
sudo gem install cucumber-rails
config.gem "cucumber-rails"







