On Thu, Jun 30, 2011 at 6:29 PM, Alex Katebi <alex.katebi at gmail.com>
wrote:>
> Using rspec version 2.6.4 I get an error with the Collection
> membership.
>
> Example: [1,2].should include(1)
The `include` method needs to be in an example for you to use it like
this. It won''t work in irb unless you first `include RSpec::Matchers`.
>
> TypeError: wrong argument type Fixnum (expected Module)
> ? ? ? ?from (irb):1:in `include''
> ? ? ? ?from (irb):1
> ? ? ? ?from /home/akatebi/.rvm/rubies/ruby-1.9.2-p180/bin/irb:16:in
`<main>''
>
>
> RubyGems Environment:
> ?- RUBYGEMS VERSION: 1.6.2
> ?- RUBY VERSION: 1.9.2 (2011-02-18 patchlevel 180) [i686-linux]
> ?- INSTALLATION DIRECTORY: /home/akatebi/.rvm/gems/ruby-1.9.2-
> p180 at endpoints
> ?- RUBY EXECUTABLE: /home/akatebi/.rvm/rubies/ruby-1.9.2-p180/bin/
> ruby
> ?- EXECUTABLE DIRECTORY: /home/akatebi/.rvm/gems/ruby-1.9.2-
> p180 at endpoints/bin
> ?- RUBYGEMS PLATFORMS:
> ? ?- ruby
> ? ?- x86-linux
> ?- GEM PATHS:
> ? ? - /home/akatebi/.rvm/gems/ruby-1.9.2-p180 at endpoints
> ? ? - /home/akatebi/.rvm/gems/ruby-1.9.2-p180 at global
> ?- GEM CONFIGURATION:
> ? ? - :update_sources => true
> ? ? - :verbose => true
> ? ? - :benchmark => false
> ? ? - :backtrace => false
> ? ? - :bulk_threshold => 1000
> ?- REMOTE SOURCES:
> ? ? - http://rubygems.org/
>
>
> _______________________________________________
> rspec-users mailing list
> rspec-users at rubyforge.org
> http://rubyforge.org/mailman/listinfo/rspec-users
>