Pivotal Labs

Main menu

Skip to primary content
Skip to secondary content
  • About
  • Case Studies
  • Team
    • Executives
    • Locations
      • San Francisco (HQ)
      • Boston
      • Boulder
      • Denver
      • London
      • Los Angeles
      • New York
  • Community
    • Blogs
    • Tech Talks
    • Events
  • Careers
    • Lifestyle
    • Principles & Practices
    • Benefits
    • FAQ
    • Apply
  • Tools
  • Contact
    • Press Room
    • Press Releases
    • In The News
    • Press Kit
  • All
  • Labs
  • Standup
  • Tracker

Standup 6/9/2009 Spring Cleaning. rspec should == useless

Colin Shield
Tuesday, June 9, 2009

Ask for help

Using Rspec 1.2.6 and an expression of some desired behavior such as this:

it "should score 0" do
  score = 0
  score.should == 0
end

Will sometimes result in a ruby warning:

warning: useless use of == in void context

There was a little confusion as to why this warning was sometimes appearing.
It turns out that the warning appears when the command ruby -w is used to run the spec rather than spec.
This seems to be the case when rake is run for a non rails project, say a plugin.

  • 0 Shares
  • Share on Facebook
  • Share on Twitter

Add New Comment Cancel reply

Your email address will not be published.

Colin Shield

Colin Shield
San Francisco

Recent Posts

  • Database.yml files using Chef Server
  • Standup Oct/19/2010: Cedar, a BDD Testing Framework for Objective C
  • Donkey & Goat Open House
Subscribe to Colin's Feed

Author Topics

chef server (1)
agile standup (2)
performance (1)
  • About
  • Case Studies
  • Team
  • Community
  • Careers
  • Tools
  • Contact
  • Labs
  • Events

Contact Us

contact@pivotallabs.com
+1 415-77-PIVOT
TwitterLinkedInFacebook

Pivotal Tracker

Tracker is the award-winning agile project management tool that enables real-time collaboration around a shared, prioritized backlog.
Visit pivotaltracker.com >