Class: Templater::Spec::Helpers::CreateMatcher

### Home Classes Methods

### In Files

- lib/templater/spec/helpers.rb

### Parent

Object

### Methods

- ::new
- #failure_message
- #matches?
- #negative_failure_message

### Files

- History.txt
- Manifest.txt

### Class/Module Index

Quicksearch

- Templater
- Templater::ActionDescription
- Templater::Actions
- Templater::Actions::Action
- Templater::Actions::Directory
- Templater::Actions::EmptyDirectory
- Templater::Actions::File
- Templater::Actions::Template
- Templater::ArgumentDescription
- Templater::CLI
- Templater::CLI::Generator
- Templater::CLI::Manifold
- Templater::Description
- Templater::Discovery
- Templater::Generator
- Templater::InvocationDescription
- Templater::Manifold
- Templater::Spec
- Templater::Spec::Helpers
- Templater::Spec::Helpers::CreateMatcher
- Templater::Spec::Helpers::InvokeMatcher
- Kernel
- String

No matching classes.

# Templater::Spec::Helpers::CreateMatcher

### Public Class Methods

new(expected) click to toggle source

    # File lib/templater/spec/helpers.rb, line 42
    def initialize(expected)
      @expected = expected
    end

### Public Instance Methods

failure_message() click to toggle source

    # File lib/templater/spec/helpers.rb, line 52
    def failure_message
      "expected #{@actual.inspect} to create #{@expected.inspect}, but it didn't"
    end

matches?(actual) click to toggle source

    # File lib/templater/spec/helpers.rb, line 46
    def matches?(actual)
      @actual = actual
      # Satisfy expectation here. Return false or raise an error if it's not met.
      @actual.all_actions.map{|t| t.destination }.include?(@expected)
    end

negative_failure_message() click to toggle source

    # File lib/templater/spec/helpers.rb, line 56
    def negative_failure_message
      "expected #{@actual.inspect} not to create #{@expected.inspect}, but it did"
    end

[Validate]

Generated with the Darkfish Rdoc Generator 2.