[rspec-devel] [ rspec-Feature Requests-5909 ] Underscored predicates don't work

noreply at rubyforge.org noreply at rubyforge.org
Tue Sep 26 04:31:09 EDT 2006


Feature Requests item #5909, was opened at 2006-09-26 04:31
You can respond by visiting: 
http://rubyforge.org/tracker/?func=detail&atid=3152&aid=5909&group_id=797

Category: None
Group: None
Status: Open
Priority: 5
Submitted By: Aslak Hellesoy (aslak_hellesoy)
Assigned to: Nobody (None)
Summary: Underscored predicates don't work

Initial Comment:
The following fails:

class Bottle
  def contain_milk?
    true
  end
end

context "A new bottle" do
  specify "should contain milk" do
    Bottle.new.should_contain_milk
  end
end

It fails with:

NoMethodError in 'A new bottle should contain milk'
undefined method `contain?' for #<Bottle:0x2d41744>
./failing_examples\bottle_spec.rb:11:in `should contain milk'

----------------------------------------------------------------------

You can respond by visiting: 
http://rubyforge.org/tracker/?func=detail&atid=3152&aid=5909&group_id=797


More information about the rspec-devel mailing list