Module: I18nInterpolationSpec::Helper

Defined in:
lib/i18n_interpolation_spec/matchers/helper.rb

Instance Method Summary collapse

Instance Method Details

#failed(&block) ⇒ Object



4
5
6
7
8
9
10
11
12
# File 'lib/i18n_interpolation_spec/matchers/helper.rb', line 4

def failed(&block)
  if respond_to? :failure_message
    # Rspec 3
    failure_message { |f| instance_exec(f, &block) }
  else
    # Rspec 2
    failure_message_for_should { |f| instance_exec(f, &block) }
  end
end