Sha256: 15a34772c3fc8e004c17b619934de3d0a0bf309db8918c7ed608e49aff781728
Contents?: true
Size: 1.6 KB
Versions: 28
Compression:
Stored size: 1.6 KB
Contents
<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> <plist version="1.0"> <dict> <key>beforeRunningCommand</key> <string>saveActiveFile</string> <key>command</key> <string># Assumes the current file is a unittest file # Runs with the currently-focused method as the test name args=$(${TM_RUBY:=ruby} <<"EOF" def parse_from_quotes(name) name.to_s.gsub(/^(?:.*"(.*)"|.*'(.*)').*$/) { $1 || $2 } end n = ENV['TM_LINE_NUMBER'].to_i should, context = nil, nil File.open(ENV['TM_FILEPATH']) do |f| lines = f.read.split("\n")[0...n].reverse context = lines.find { |line| line =~ /^\s*context\b/ } should = parse_from_quotes(lines.find { |line| line =~ /^\s*should\b/ }) end if !context.empty? && !should.empty? puts "shoulda" context = parse_from_quotes( context ) name = "#{context}".gsub(/[\+\.\s\'\"\(\)]/,'.') print "--name=/#{name}/ -v v" end EOF) if [[ -z "$args" ]]; then echo -e "This doesn't appear to be a TestCase class." exit_show_tool_tip fi export RUBYLIB="$TM_BUNDLE_SUPPORT/RubyMate${RUBYLIB:+:$RUBYLIB}" "${TM_RUBY:-ruby}" -- "$TM_BUNDLE_SUPPORT/RubyMate/run_script.rb" $args</string> <key>fallbackInput</key> <string>scope</string> <key>input</key> <string>document</string> <key>keyEquivalent</key> <string>~@r</string> <key>name</key> <string>Run Context</string> <key>output</key> <string>showAsHTML</string> <key>scope</key> <string>source.ruby.rails.shoulda</string> <key>uuid</key> <string>2989704F-8F6B-439F-83A7-368BB174A010</string> </dict> </plist>
Version data entries
28 entries across 28 versions & 1 rubygems