Installing RSpec for Rails 3
Wed Apr 14 20:48:06 -0700 2010
Installing RSpec for Rails 3 was quite simple, here is a short guide to make sure you can also do it :)
For a Rails 3 app, simply edit the Gemfile and put this into the test section:
group :test do gem "rspec-rails", ">= 2.0.0.beta" gem "autotest" gem "autotest-rails" end
Then from your Rails root do:
$ bundle install
Once installed, you will need to tell RSpec to install itself:
$ script/rails g rspec:install
exist lib
create lib/tasks/rspec.rake
exist config/initializers
create config/initializers/rspec_generator.rb
exist spec
create spec/spec_helper.rb
create autotest
create autotest/discover.rb
Then you should just be able to run Autotest:
$ autotest loading autotest/rails_rspec2 style: RailsRspec2 /Users/mikel/.rvm/rubies/ruby-1.8.7-p249/bin/ruby <snip> ........ Finished in 0.30205 seconds 8 examples, 0 failures
Nice.
blogLater
Mikel
Leave a Reply
Latest posts
- Encrypting Another Partition Using FileVault 2 on OSX Lion
- Installing Home Folder on Second Drive on OSX Lion
- undefined local variable or method `version_requirements'
- A New World of Resources
- Rails Static Pages
- Twitter Replacing Rails? So?
- Engine Yard Cloud Backups Generating Zero Length Backups
- Our Rails Rumble Entry - StillAlive.com
- Renaming a controller and redirection in Rails 3
- Updating RailsPlugins.org to Rails 3 - Part 1
- A new protocol for social interaction
- What is a distributed social network?
- Bundler and Public Git Sources
- Getting Heroku, memcached and Rails 3 working
- Why Bundler?
- Rails Commit Access
- Introducing TellThemWhen
- rake RSpec & Cucumber uninitialized constant Rails::Boot::Bundler
- This Relationship is Worth Nothing
- Thank YOU...
- Inline Attachments for ActionMailer
- Upgrading RailsPlugins.org to Rails 3 - Part 1
- Stripping dollar signs and commas from a string
- Getting Rails 3 Edge with jQuery, RSpec and Cucumber using RVM
- Action Mailer, go Proc thyself
- The Real News Donation Drive
- ActionMailer ScreenCast and Article
- I am speaking at RailsConf 2010
- Rails 3 Session Secret and Session Store
- If you're lazy and you know it write your specs!
- Bundler - uninitialized constant ActionController
- Bundle Me Some Sanity
- How to use Mail / ActionMailer 3 with GMail SMTP
- Put your mailer where the action is!
- Why Force a Choice?
- How to make an RSS feed in Rails
- Rails 3 Routing with Rack
- Bundle me some Rails
- Helping out in Haiti
- Watch your self
- Is Rails 3.0 a Game Changer?
- Where did the scripts go?
- validates :rails_3, :awesome => true
- New Rails Version 3.0 Guides Online
- New ActionMailer API in Rails 3.0
- Mail gem version 2 released
- How to rename a Rails 3 Application
- Rails 3.0 Examples
- DECCA Driving Day
Latest comments
- Quantspring.com
This is a really great post I f...
- Maxine
Maybe it has a connection with ...
- Axel W
Had the same problem lots of ti...
- cloud computing anbieter
I was there and I see you confe...
- cloud computing anbieter
I was there and I see you confe...
Categories
Tag Cloud
AJAX ARGH! ActiveRecord Ajax Apache Apple Asterisk Australia Copy Database Development Feedburner Gem server Google Human Rights Javascript L. Ron Hubbard MS SQL Server MacOSX Mail Mephisto Not Programming OpenBSD Opensource Performance Personal Integrity PostgreSQL Programming Prototype Puzzle RDoc REST RESTful Rails RSPec RSpec Rails Rails Tips Rspec Ruby Ruby on Rails Ruby on Rails Tips Ruby on rails Tips SQL SQLServer SVN Scientologist Scientology Site Stats Soekris Soekris net5501 TMail Textmate Tips Windows World about mikel anti drug apache contributing daemon documentation drugs illustrator javascript lambda mail mephisto newspapers nitro open source opensource photoshop productivity programming railscasts rspec ruby ruby on rails rubyforge scientology seo sitemap sqlserver tips tmail tom cruise unix tricks vector graphicsArchives
- November 2009 (1)
- October 2009 (2)
- September 2009 (2)
- August 2009 (0)
- July 2009 (1)
- June 2009 (0)
- May 2009 (1)
- April 2009 (0)
- March 2009 (0)
- February 2009 (0)
- January 2009 (2)
- December 2008 (0)
- November 2008 (5)
- October 2008 (0)
- September 2008 (1)
- August 2008 (0)
- July 2008 (2)
- June 2008 (13)
- May 2008 (7)
- April 2008 (18)
- March 2008 (8)
- February 2008 (5)
- January 2008 (7)
- December 2007 (20)
- November 2007 (22)




Wed May 02 01:09:22 -0700 2012
Hi there,
i love Rails, it’s simply and a lot of PHP and ZEND combination.
Tom
Wed May 02 01:09:39 -0700 2012
Hi there,
i love Rails, it’s simply and a lot of PHP and ZEND combination.
Tom
Tue Nov 08 19:43:51 -0800 2011
On a related note. It seems the RSpec bundle for TextMate needs updating. The bundle’s spec file generator (shift+control+down_arrow) is inserting the spec stub code into the source file instead of the generated spec file.
Thu Apr 15 05:47:07 -0700 2010
Rspec 2.0 is full compatible to Rails 3 ? or not now ?
Thu Apr 15 06:28:28 -0700 2010
Your post has been linked at the Drink Rails blog roll for the day.
Thu Apr 15 08:40:52 -0700 2010
Thanks for the info.
On a related note. It seems the RSpec bundle for TextMate needs updating. The bundle’s spec file generator (shift+control+down_arrow) is inserting the spec stub code into the source file instead of the generated spec file.
Tue May 08 01:35:55 -0700 2012
I supposed that I almost perfectly knew Rails 3, but this source proved me that I had mistaken. So useful articles! So example, I have never heard that it is possible to install RSpec for Rails 3. Thanks a lot for sharing!
Sat May 08 22:07:13 -0700 2010
Got this after following the steps:
$ autotest
loading autotest/rails_rspec2
Error loading Autotest style autotest/rails_rspec2 (no such file to load — autotest/rails_rspec2). Aborting.
help appriciated.
Tue May 15 00:29:39 -0700 2012
Sometimes, people need to be the right procedure installing. It happens because the installation will effect the performance. Then, people should read the guide in installing.
Thu Aug 04 12:13:10 -0700 2011
I did not realize that this was simple. It is encouraging to see you guys doing this sort of thing. I will take a look and see if the benefits will be worthwhile for me. Thanks for posting these instructions.
Wed Nov 30 06:15:08 -0800 2011
Such an amazing blog you have posted dear i like it and also suggesting it to my friends for visiting your blog because it has really admirable and informative data which provide us through your blog so i would like to thank you for sharing it with us and also appreciate you on this so keep it up.
Tue Nov 01 01:58:34 -0700 2011
Want to know Rspec 2.0 is full compatible to Rails 3 ?
Wed Nov 30 06:15:18 -0800 2011
Such an amazing blog you have posted dear i like it and also suggesting it to my friends for visiting your blog because it has really admirable and informative data which provide us through your blog so i would like to thank you for sharing it with us and also appreciate you on this so keep it up.
Thu Dec 29 22:38:51 -0800 2011
I am appreciating it very much! Looking forward to another great blog. Good luck to the author! all the best!
chefs clothing
Fri Feb 03 22:53:26 -0800 2012
About this topic, I have been lately in your blog once or twice now. I just wanted to say hi and show my thanks for the information provided.
Fri Feb 03 22:53:37 -0800 2012
About this topic, I have been lately in your blog once or twice now. I just wanted to say hi and show my thanks for the information provided.
Sun Feb 05 20:29:59 -0800 2012
Such an amazing blog you have posted dear i like it and also suggesting it to my
illuminati friends for visiting your blog because it has really admirable and informative data which provide us through How the illuminati work your blog so i would like to thank you for sharing it with us and also appreciate you on this so keep it up.
Tue Feb 07 03:34:27 -0800 2012
Hiee, I love your blogs layout and style of your articles. I will subscribe for your feed please keep posting! Big thanks for the useful information I found here.
gold prices today
Thu Feb 09 07:20:22 -0800 2012
Easy tutorial on installing RSpec for Rails 3. Not very complex as I thought so. Thanks for the help.
Thu Feb 16 08:53:48 -0800 2012
At times, your set up procedure is just not easy. Persons must sign up to perform the method. Therefore, they may acquire what they already want there after. Diablo 3 strategy guide reviews
Wed Mar 14 19:47:06 -0700 2012
If you have anyone who is experienced with Access why not build your own system from the ground up? That allows for the reports you want, ease of use, and you can add on as you grow. charity auction items
Wed Mar 14 19:41:10 -0700 2012
I’m hoping that those get populated before the job is complete, because aside from the page data, we’re using wikipedia categories to do a crude classification of entities, and pagelink data to construct a graph of pages and their connections. NYC pilates
Wed Mar 14 19:44:16 -0700 2012
Perhaps the biggest advantage of rpsec over XUnit type unit testing is that I get to specify my object behavior prior to writing a single line of code for the object in something that looks, feels like English, which is something I’m fairly fluent in. criminal lawyer fort lauderdale
Wed Mar 14 19:47:23 -0700 2012
If you have anyone who is experienced with Access why not build your own system from the ground up? That allows for the reports you want, ease of use, and you can add on as you grow. charity auction items
Sat Mar 17 00:34:16 -0700 2012
It is useful blog for everyone and i have got many new ideas and information with this blog. Thanks for sharing wonderful information.
reverse address lookup
Sat Mar 17 00:36:30 -0700 2012
It is useful blog for everyone and i have got many new ideas and information with this blog. Thanks for sharing wonderful information.
reverse address lookup
Fri Mar 30 05:02:46 -0700 2012
Wow, I love your site, big thank you to these ideas, and note in the first place that I fully agree with you! Let me emphasize, yes your article was excellent. I definitely enjoyed every little bit of it,
Sun Apr 08 23:39:14 -0700 2012
Guidance is very useful for beginners. It helps them a lot to start their work properly.
Girl games online