Sha256: ba883b6e3fa6afb8194d33b15d42f5bb777f4af4b6455d1f53badc67d6f20349
Contents?: true
Size: 967 Bytes
Versions: 1
Compression:
Stored size: 967 Bytes
Contents
module RSpec::RailsApp::ArtifactFile module Matchers class HaveRailsArtifactFiles include ::Rails3::Assist::Artifact::FileName include ArtifactFile::Matcher::Helper def initialize(artifact_type, *names) @names = names extend "Rails3::Assist::Artifact::#{artifact_type.to_s.camelize}".constantize handle_view artifact_type, names self.artifact_type = artifact_type self.artifact_name = name.to_s end def matches?(root_path, &block) names.to_strings.each do |name| self.artifact_name = get_artifact_name return false if !File.file?(artifact_name) end yield if block true end end def have_rails_artifact_files(artifact_type, *names) HaveRailsArtifactFiles.new(artifact_type, *names) end alias_method :contain_rails_artifact_files, :have_rails_artifact_files end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
rails-app-spec-0.2.7 | lib/rails_app_spec/matchers/artifact/have_rails_artifact_files.rb |