[rspec-users] Missing model attribute in cucumber test
aslak.hellesoy at gmail.com
Wed Jan 14 16:05:06 EST 2009
> James Byrne wrote:
> I have gotten past this somehow. The only thing that I think may have
> influenced this is manually preparing the test database. However,
> now I
> have a different problem.
> Here is the same step definition:
> When /user named "(.*)" is an administrator/ do |name|
> my_user = User.find_by_username!(name)
> puts my_user.administrator.to_s
> This produces this output in a cucumber run:
> And the user named "newuser" is an administrator #
> Notice the value reported from the puts statement. Yet, this feature
> step passes. What am I doing wrong?
Where did you expect it to fail? This will fail:
False return values never fails unless you use #should like above.
> Posted via http://www.ruby-forum.com/.
> rspec-users mailing list
> rspec-users at rubyforge.org
More information about the rspec-users