Class GenSpec::GenerationMatchers::ResultMatcher
In: lib/genspec/generation_matchers/result_matcher.rb
Parent: GenSpec::GenerationMatchers::GenerationMatcher

Methods

Attributes

filename  [R] 

Public Class methods

[Source]

# File lib/genspec/generation_matchers/result_matcher.rb, line 6
      def initialize(filename, &block)
        @filename = filename
        @block = block
        super(:does_not_matter)
      end

Public Instance methods

[Source]

# File lib/genspec/generation_matchers/result_matcher.rb, line 12
      def after_replay(target)
        path = File.join(target.destination_root, filename)
        if File.exist?(path)
          matched!
          validate_block(target, path)
        end
      end

[Source]

# File lib/genspec/generation_matchers/result_matcher.rb, line 20
      def failure_message
        "Expected to generate file #{filename}"
      end

[Source]

# File lib/genspec/generation_matchers/result_matcher.rb, line 24
      def negative_failure_message
        "Expected to not generate file #{filename}"
      end

[Validate]