Sha256: a6d4528b88501f3f5af55fa42f2157e75070bdb7c85350d4fdb3de330c179f0e

Contents?: true

Size: 863 Bytes

Versions: 14

Compression:

Stored size: 863 Bytes

Contents

$TESTING=true
$:.push File.join(File.dirname(__FILE__), '..', 'lib')

def template_path(template)
  File.expand_path(File.join(File.dirname(__FILE__), 'templates', template))
end

def result_path(result)
  File.expand_path(File.join(File.dirname(__FILE__), 'results', result))
end

require 'templater.rb'
require 'rubygems'
require 'spec'
require 'fileutils'

class MatchActionNames
  def initialize(*names)
    @names = names.map{|n| n.to_s}
  end

  def matches?(actual)
    @actual = actual
    @actual.map{|a| a.name.to_s}.sort == @names.sort
  end

  def failure_message
    "expected #{@actual.inspect} to have action names #{@names.inspect}, but they didn't"
  end

  def negative_failure_message
    "expected #{@actual.inspect} not to have action names #{@names.inspect}, but they did"
  end
end

def have_names(*names)
  MatchActionNames.new(*names)
end

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
templater-0.3.3 spec/spec_helper.rb
templater-0.2.1 spec/spec_helper.rb
templater-0.2.2 spec/spec_helper.rb
templater-0.3.4 spec/spec_helper.rb
templater-0.3.2 spec/spec_helper.rb
templater-0.2 spec/spec_helper.rb
templater-0.3.1 spec/spec_helper.rb
templater-0.3.0 spec/spec_helper.rb
templater-0.4.1 spec/spec_helper.rb
templater-0.4.0 spec/spec_helper.rb
templater-0.4.2 spec/spec_helper.rb
templater-0.4.3 spec/spec_helper.rb
templater-0.3.5 spec/spec_helper.rb
templater-0.4.4 spec/spec_helper.rb