Skip to content

Instantly share code, notes, and snippets.

@ppworks
Created January 7, 2012 03:08
Show Gist options
  • Save ppworks/1573639 to your computer and use it in GitHub Desktop.
Save ppworks/1573639 to your computer and use it in GitHub Desktop.
check ancestors for RSpec
def ancestors_should_include ancestors
describe 'ancestors' do
ancestors.each do |ancestor|
it {subject.class.ancestors.should be_include ancestor}
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment