Sha256: a532f53aaf680f199552148312ba7c58046d2f95dabbe23f54d40c55215dd92b

Contents?: true

Size: 653 Bytes

Versions: 29

Compression:

Stored size: 653 Bytes

Contents

irt_at_exit{git_reset_app}

def invoke(*args)
  Rails::Generators.invoke *args
end

def files_exist?(paths)
  missing = paths.reject{|f| File.exists?(f)}
  missing.empty? || missing
end

def file_include?(path, *strings)
  file_content path, :select, *strings
end

def file_exclude?(path, *strings)
  file_content path, :reject, *strings
end

def file_content(path, action, *strings)
  f = File.read(path)
  wrong = strings.send(action) do |s|
            re = s.is_a?(Regexp) ? s : /#{Regexp.escape(s)}/
            !(f =~ re)
          end
  wrong.empty? || wrong
end

def git_reset_app
  system %(cd #{Hobo.root} && rake test:prepare_testapp -q)
end

Version data entries

29 entries across 29 versions & 1 rubygems

Version Path
hobo-1.3.3 test/irt/generators/helper.rb
hobo-1.3.2 test/irt/generators/helper.rb
hobo-1.3.1 test/irt/generators/helper.rb
hobo-1.3.0 test/irt/generators/helper.rb
hobo-1.3.0.RC4 test/irt/generators/helper.rb
hobo-1.3.0.RC3 test/irt/generators/helper.rb
hobo-1.3.0.RC2 test/irt/generators/helper.rb
hobo-1.3.0.RC1 test/irt/generators/helper.rb
hobo-1.3.0.RC test/irt/generators/helper.rb
hobo-1.3.0.pre31 test/irt/generators/helper.rb
hobo-1.3.0.pre29 test/irt/generators/helper.rb
hobo-1.3.0.pre28 test/irt/generators/helper.rb
hobo-1.3.0.pre27 test/irt/generators/helper.rb
hobo-1.3.0.pre26 test/irt/generators/helper.rb
hobo-1.3.0.pre25 test/irt/generators/helper.rb
hobo-1.3.0.pre24 test/irt/generators/helper.rb
hobo-1.3.0.pre23 test/irt/generators/helper.rb
hobo-1.3.0.pre22 test/irt/generators/helper.rb
hobo-1.3.0.pre21 test/irt/generators/helper.rb
hobo-1.3.0.pre20 test/irt/generators/helper.rb