[rspec-users] how to play with rSpec using irb

Alr Alr lists at ruby-forum.com
Wed Oct 15 00:10:51 EDT 2008


Hi,

Is there any way to experiment with rSpec in irb or script/console
session?

Tried this:

>> require 'spec'
=> true
>> [1,2,3].should have(3).items
=> NoMethodError: undefined method `have' for main:Object
  from (irb):4
  from
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/fileutils.rb:1576

What I am doing wrong?

Thx
-- 
Posted via http://www.ruby-forum.com/.


More information about the rspec-users mailing list