Sha256: fd10c081b2ce37c3859e862d1f85b0e5bf4aa3fb1192eeb6dcf33154f76f0ca8

Contents?: true

Size: 521 Bytes

Versions: 11

Compression:

Stored size: 521 Bytes

Contents

require "pathname"

module WatirSplash
  module Generators
    class MigrateProject < Thor::Group
      include Thor::Actions

      argument :dir

      def self.source_root
        File.dirname(__FILE__) + "/templates"
      end

      def migrate
        gsub_file("config.rb", /^(\s*)Spec::Runner\./, "\\1RSpec.")

        if File.basename(Dir.pwd) == "ui-test"
          remove_file "spec/spec.opts"
          template "new_project/.rspec", ".rspec"
        end
      end

    end
  end
end

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
watirsplash-1.4.3 lib/watirsplash/generators/migrate_project.rb
watirsplash-1.4.2 lib/watirsplash/generators/migrate_project.rb
watirsplash-1.4.1 lib/watirsplash/generators/migrate_project.rb
watirsplash-1.4.0 lib/watirsplash/generators/migrate_project.rb
watirsplash-1.3.0 lib/watirsplash/generators/migrate_project.rb
watirsplash-1.2.1 lib/watirsplash/generators/migrate_project.rb
watirsplash-1.2.0 lib/watirsplash/generators/migrate_project.rb
watirsplash-1.1.2 lib/watirsplash/generators/migrate_project.rb
watirsplash-1.1.1 lib/watirsplash/generators/migrate_project.rb
watirsplash-1.1.0 lib/watirsplash/generators/migrate_project.rb
watirsplash-1.0.0 lib/watirsplash/generators/migrate_project.rb