# File lib/sugar-high/rspec/matchers/have_aliases.rb, line 34 def cause_msg cause[0..3].join('.') end
# File lib/sugar-high/rspec/matchers/have_aliases.rb, line 38 def failure_message "Expected aliases to exist, but: #{cause_msg}" end
# File lib/sugar-high/rspec/matchers/have_aliases.rb, line 30 def is_alias? obj, alias_meth obj.respond_to? alias_meth end
# File lib/sugar-high/rspec/matchers/have_aliases.rb, line 18 def matches? obj, options={} if !obj.respond_to? method cause << "Method ##{method} to alias does NOT exist" return nil end alias_methods.each do |method| cause << "Alias method ##{method} does NOT exist" if !is_alias? obj, alias_meth end cause.empty? end
Generated with the Darkfish Rdoc Generator 2.