rspec-rails: undefined method `true?' for true:TrueClass after updating to 3.0.0.beta2 version -


after updating rspec-rails version 2.14.0 3.0.0.beta2, tests uses be_true or be_false fails.

 failure/error: user.new_record?.should be_true  nomethoderror:    undefined method `true?' true:trueclass 

any suggestion? google returns this!

as of version 3.0, rspec renamed be_true be_truthy , be_false be_falsey documented in https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers/be-matchers , discussed in https://github.com/rspec/rspec-expectations/issues/283.

be_true , be_false deprecated in 2.99 , dropped in 3.00 because didn't just match true , false, respectively , therefore misleading. error message you're getting because absent specific be_xxxx method definition, be_xxxx , invoke xxxx? on actual.

note if want match just true, can use be true (or be(true)).


Comments

Popular posts from this blog

Android layout hidden on keyboard show -

google app engine - 403 Forbidden POST - Flask WTForms -

c - Why would PK11_GenerateRandom() return an error -8023? -