Class: Dommy::Rails::RSpec::Matchers::HaveAuthenticityToken
- Inherits:
-
Object
- Object
- Dommy::Rails::RSpec::Matchers::HaveAuthenticityToken
- Defined in:
- lib/dommy/rails/rspec/matchers.rb
Instance Method Summary collapse
- #description ⇒ Object
- #does_not_match?(actual) ⇒ Boolean
- #failure_message ⇒ Object
- #failure_message_when_negated ⇒ Object
- #matches?(actual) ⇒ Boolean
Instance Method Details
#description ⇒ Object
317 318 319 |
# File 'lib/dommy/rails/rspec/matchers.rb', line 317 def description "have Rails authenticity token field" end |
#does_not_match?(actual) ⇒ Boolean
313 314 315 |
# File 'lib/dommy/rails/rspec/matchers.rb', line 313 def does_not_match?(actual) !matches?(actual) end |
#failure_message ⇒ Object
321 322 323 |
# File 'lib/dommy/rails/rspec/matchers.rb', line 321 def "expected to find Rails authenticity token field" end |
#failure_message_when_negated ⇒ Object
325 326 327 |
# File 'lib/dommy/rails/rspec/matchers.rb', line 325 def "expected not to find Rails authenticity token field" end |
#matches?(actual) ⇒ Boolean
309 310 311 |
# File 'lib/dommy/rails/rspec/matchers.rb', line 309 def matches?(actual) Dommy::Rails::PageInspector.authenticity_token?(MatchTarget.document(actual)) end |