Hi,
I am running rspec spec for Rails 3.The version for rspec is 2.4.0
When running the script i am getting output as
User Profile should not be created if name is blank
Failure/Error: @contact_detail.should be_valid
expected valid? to return true, got false
# ./spec/models/merchant_spec.rb:79
for every failed spec.
From the above result it is not clear actually what is the error where
as in rspec version 1.2.9 we would get like “user_name cannot be blank”
I am running the spec as “bundle exec rspec spec/models/user_spec.rb”
Is there any other way of running the spec so that i can get a better
result
My Gemfile contains following gems:
gem “rspec-rails”, “>= 2.0.0.beta”
gem “autotest”
gem “autotest-rails”
When running the script i am getting output as
User Profile should not be created if name is blank
Failure/Error: @contact_detail.should be_valid
expected valid? to return true, got false
./spec/models/merchant_spec.rb:79
for every failed spec.
From the above result it is not clear actually what is the error where
as in rspec version 1.2.9 we would get like “user_name cannot be blank”
I’m not sure what things were like in 1.2.9 and how well your existing
1.2.9 specs are supported in 2.4.0. Testing for specific errors can be
done like this: