# encoding: utf-8 require 'fedux_org_stdlib/roles/comparable_by_name' module FeduxOrgStdlib module FixturesManagement # Fixture class Fixture include Roles::ComparableByName private attr_reader :type public attr_reader :name, :path def initialize(path) @path = Pathname.new(path) end # Name of fixture def name path.basename.to_s.to_sym end # Is of type? # # @return [TrueClass,FalseClass] # The result of test def type?(t) type == t end private def type if path.end_with? '-plugin' :plugin else :app end end end end end