Ruby-on-rails – RSPEC can output a value that makes test failure?

I have this statement:

@obj[:attribute].eql?("TestValue").should be_true

If not just tell me the test failed, it will tell me it failed, because @obj[:attribute] is zero or 1234 or what it is, it will be good. Is there any Way to do this?

what to do when

@obj.attribute.should eql(5)

and it will throw an error, you usually see

expected 5
got 10

Are there any specific reasons why you are doing eql?

I have this statement:

@obj[:attribute].eql?("TestValue ").should be_true

If instead of just telling me that the test failed, it will tell me that it failed, because @obj[:attribute] is zero or 1234 or what it is, it would be good . Is there a way to do this?

When doing something

@obj.attribute.should eql(5)< /pre> 

And it will throw an error, you usually see

expected 5
got 10

Is there The specific reason why you are doing eql?

WordPress database error: [Table 'yf99682.wp_s6mz6tyggq_comments' doesn't exist]
SELECT SQL_CALC_FOUND_ROWS wp_s6mz6tyggq_comments.comment_ID FROM wp_s6mz6tyggq_comments WHERE ( comment_approved = '1' ) AND comment_post_ID = 3304 ORDER BY wp_s6mz6tyggq_comments.comment_date_gmt ASC, wp_s6mz6tyggq_comments.comment_ID ASC

Leave a Comment

Your email address will not be published.