rspec's .should fails (outside describe/it block) in Ruby 2? -


In Ruby 2, with gem rspec 2.14.1 (the most recent of the Ubuntu), due to lack of installed rail, Why is it unsuccessful?

  'rubygems' is required 'rspec' 3. Shouldnt == 3 NoMethodError: An uncertain method for 'should': Fixnum  

I have trusted

And say this syntax is still the default Formally supported. The title "outside description / block" has been added with the title , because it seems to be the root cause.

If you want to use it outside the description / it block, So it seems that you have to enable it first, though the documentation says that it is enabled by default. I suppose that enable by default means only a specific file is in [] for example:

  requires' rubygems' 'rspec 'RSpec.configure do | Config | Config.expect_with: rspec do | C | C.syntax =: end should end 3. Shield == 3 # true  

Comments

Popular posts from this blog

ios - How do I use CFArrayRef in Swift? -

eclipse plugin - Run java code error: Workspace is closed -

c - Error on building source code in VC 6 -