Class: RSpecFixtures::Matchers::MatchFixture

Inherits:
Base
  • Object
show all
Defined in:
lib/rspec_fixtures/matchers/match_fixture.rb

Instance Attribute Summary

Attributes inherited from Base

#actual, #fixture_name

Instance Method Summary collapse

Methods inherited from Base

#diffable?, #expected, #failure_message, #fixture_file, #fixtures_dir, #initialize, #interactive?

Constructor Details

This class inherits a constructor from RSpecFixtures::Matchers::Base

Instance Method Details

#matches?(actual) ⇒ Boolean

Returns:

  • (Boolean)


8
9
10
11
12
13
14
15
# File 'lib/rspec_fixtures/matchers/match_fixture.rb', line 8

def matches?(actual)
  @actual = actual
  if actual == expected or !interactive?
    actual == expected
  else
    approve_fixture
  end
end