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
- 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
- Mail now merged into ActionMailer
- Tip #29 - Stop a Mongrel (or any) Service in Windows
- Ruby on Rails Tips Page
- Monitoring a DAHDI or Zaptel Channel
- Mail gets some compliments!
- Rails Unit Tests: uninitialized constant error
- New Mail gem released
- Mail and Bounced Emails
- Mail, TMail, The Future of Ruby Email Handling
- Custom Music on Hold for Asterisk
- Always getting an invalid authenticity token error
- Windows ipconfig does not show anything
- FreeBSD rc scripts
- How to monitor a logged in professional
- TMail Moves to GIT
- Funny...
- How to reset a sequence with PostgreSQL
Latest comments
- ferrisoxide
Hey Mikel Thanks for the hea...
- B
@im - try this (from RSoC): htt...
- ferrisoxide
Hey Mikel Thanks for the hea...
- Ian Alexander Wood
Just a quick update on this exc...
- Daze
The command is "rails new app_n...
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)


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.
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.