Skip to content

Instantly share code, notes, and snippets.

@bebanjo
Created January 26, 2011 19:30
Show Gist options
  • Save bebanjo/797258 to your computer and use it in GitHub Desktop.
Save bebanjo/797258 to your computer and use it in GitHub Desktop.
class Spec::Rails::Example::AcceptanceExampleGroup
raise "Please, try to remove this. In this version of Rails it might be not necessary" unless Rails.version == "2.3.3"
def method_missing(sym, *args, &block)
return Spec::Matchers::Be.new(sym, *args) if sym.to_s =~ /^be_/
return Spec::Matchers::Has.new(sym, *args) if sym.to_s =~ /^have_/
super
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment