On Aug 11, 2010, at 2:31 AM, Nadal wrote: > I am using rails edge. I am using gem "rspec-rails", "= 2.0.0.beta. > 19" . > > I have following code at spec/models/user_spec.rb > > require 'spec_helper' > > describe User do > > it { should validate_presence_of(:email) } > > it { should validate_presence_of(:name) } > > end > > > Here is my gemfile > > group :development, :test do > gem 'factory_girl_rails', :git => 'git://github.com/thoughtbot/ > factory_girl_rails' > gem 'shoulda' > gem "rspec-rails", "= 2.0.0.beta.19" > gem "cucumber-rails", "= 0.3.2" > gem "capybara" > gem "launchy" > end > > I am getting following error message. > > > Failure/Error: it { should validate_presence_of(:email) } > undefined method `validate_presence_of' for > #<RSpec::Core::ExampleGroup::Nested_2:0x10a63e3a8 @__memoized={}> > # ./spec/models/user_spec.rb:5
Sounds like shoulda is not registering itself properly with rspec-2. I'd check with the should list: http://groups.google.com/group/shoulda. HTH, David _______________________________________________ rspec-users mailing list rspec-users@rubyforge.org http://rubyforge.org/mailman/listinfo/rspec-users