class Object

Public Instance Methods

options_matching?() click to toggle source
# File lib/spec_cat/matchers/validate_with.rb, line 19
def options_matching?
  if @options.present?
    @options.all? { |option| @validator.options[option] == @options[option] }
  else
    true
  end
end
spec_file_for( path ) click to toggle source
# File lib/spec_cat/matchers/have_a_spec.rb, line 23
def spec_file_for( path )
  basename = File.basename( path, '.rb' ) + '_spec.rb'

  dirname = File.dirname( path )
  dirname.gsub!( /^app/, 'spec' )
  dirname.gsub!( /^lib/, 'spec/lib' )

  return File.join( dirname, basename )
end