Displaying 2 results from an estimated 2 matches for "be_includ".
Did you mean:
be_include
2007 Oct 04
7
Using Predicates to look at an array..
...e done:
shipping_type.include?(Cart::SHIPPING_TYPE_REGULAR).should be_true
This works, but looks really ugly.. It just doesn''t roll of the
tongue very well. I then looked up the use of Predicates, which I
had been using, but hadn''t realized:
shipping_type.should be_include(Cart::SHIPPING_TYPE_REGULAR)
This works, however the syntac of be_include looks very odd... Is
there any way to do:
shipping_type.should_include(Cart::SHIPPING_TYPE_REGULAR)
How are other folks looking at the contents of an Array? Am I going
around bassackwards on this?
Eric
-----...
2007 Aug 15
3
ActsAsList specs
...ople specifying models which act_as_list?
I''m thinking that it would be possible to check that acts_as_list
instance methods have been added to a class using something like this:
describe Page, "acts_as_list" do
it "should act as a list" do
Page.ancestors.should be_include(ActiveRecord::Acts::List::InstanceMethods)
end
it "should use page_index as position_column" do
Page.new.position_column.should == "page_index"
end
it "should have scope of book_id" do
Page.new.scope_condition.should == "book_id IS NULL"...