Module: RSpec::Rails::TestUnitAssertionAdapter::ClassMethods
- Defined in:
- lib/rspec/rails/adapters.rb
Instance Method Summary collapse
Instance Method Details
#assertion_method_names ⇒ Object
34 35 36 37 |
# File 'lib/rspec/rails/adapters.rb', line 34 def assertion_method_names Test::Unit::Assertions.public_instance_methods.select{|m| m.to_s =~ /^(assert|flunk)/} + [:build_message] end |
#define_assertion_delegators ⇒ Object
39 40 41 42 43 44 45 46 47 |
# File 'lib/rspec/rails/adapters.rb', line 39 def define_assertion_delegators assertion_method_names.each do |m| class_eval <<-CODE def #{m}(*args, &block) assertion_delegate.send :#{m}, *args, &block end CODE end end |