Module: Spec::Rails::Matchers::AssertSelect::TestResponseOrString

Defined in:
lib/spec/rails/matchers/assert_select.rb

Instance Method Summary collapse

Instance Method Details

#string?Boolean

Returns:

  • (Boolean)


51
52
53
# File 'lib/spec/rails/matchers/assert_select.rb', line 51

def string?
  String === self
end

#test_response?Boolean

Returns:

  • (Boolean)


45
46
47
48
49
# File 'lib/spec/rails/matchers/assert_select.rb', line 45

def test_response?
  ActionController::TestResponse === self and
                                     !self.headers['Content-Type'].blank? and
                                     self.headers['Content-Type'].to_sym == :xml
end