Sha256: 7f10586ef896684da21ff221e616b44b453c96d23c5d0aae7ea114b375c3e7fe

Contents?: true

Size: 575 Bytes

Versions: 3

Compression:

Stored size: 575 Bytes

Contents

module RSpec::RailsApp::ArtifactFile  
  module Matchers
    
    (::RailsAssist.artifacts - [:view]).each do |name|
      class_eval %{
        def have_#{name}_file relative
          have_rails_artifact_file relative, :#{name}
        end
        alias_method :contain_#{name}_file, :have_#{name}_file
      }
    end
    
    def have_view_file folder, action= :show, view_ext='html.erb'
      arg = {:folder => folder, :action => action, :view_ext => view_ext}
      have_rails_file arg, :view
    end
    alias_method :contain_view_file, :have_view_file
  end
end   

 

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
rails-app-spec-0.5.0 lib/rails_app_spec/matchers/artifact/have_artifact_file.rb
rails-app-spec-0.4.0 lib/rails_app_spec/matchers/artifact/have_artifact_file.rb
rails-app-spec-0.3.3 lib/rails_app_spec/matchers/artifact/have_artifact_file.rb