Sha256: c50e0809929cfa48c90858292ed41da84d6c224456a963328626f07fc9c2e723

Contents?: true

Size: 507 Bytes

Versions: 1

Compression:

Stored size: 507 Bytes

Contents

module Routespec
  module Tasks
    class << self
      ##
      # output file should be "#{Rails.root}/spec/routespec/support/routes.txt"
      # pass Rails.root in dir_name arg
      def routes(dir_name, output_file_name)
        output = nil
        Dir.chdir(dir_name) do
          output = `rake routes`        
        end
        raise unless Dir.exist?(File.dirname(output_file_name))
        Routespec::Fyle.string_to_file(output, output_file_name) 
        return true
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
routespec-0.0.1 lib/routespec/tasks.rb