Hi guys,
I'm just beginning to use RSpec and I ran into the issue of testing a
named_scope. I'm not actually trying to test its behavior, as it's not
my code, but I wanted to test at least that it's defined. I tried
doing this:
describe Post, ".most_recent" do
it "should be defined" do
Post.method_defined?(:most_recent).should be_true
end
end
But it always fails, even though it *is* defined. Any idea on how to test this?
Thanks a lot!
Cheers,
--
Helder Ribeiro
ProFUSION
Embedded Systems
http://profusion.mobi
"If I have not seen as far as others, it is because giants were
standing on my shoulders" -- Jeff Goll
_______________________________________________
rspec-users mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/rspec-users