Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Franklin Webber
committed
Dec 11, 2010
1 parent
0418e4f
commit e3f7864
Showing
15 changed files
with
339 additions
and
333 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,18 @@ | ||
begin | ||
require 'autotest/growl' | ||
rescue Exception | ||
puts %{ | ||
Autotest/Autospec can use Growl (growl.info|growlforwindows.com) to assist with reporting errors. | ||
This would require Growl for the appropriate platform (MAC|Windows) and the Ruby gem 'karl-autotest-growl' | ||
} | ||
sleep 4 | ||
end | ||
|
||
Autotest.add_hook(:initialize) {|at| | ||
at.add_exception %r{^\.git} # ignore Version Control System | ||
at.add_exception %r{^./tmp} # ignore temp files, lest autotest will run again, and again... | ||
at.add_mapping(%r{^lib/.*\.rb$}) {|f, _| | ||
Dir['spec/**/*.rb'] | ||
} | ||
nil | ||
} | ||
begin | ||
require 'autotest/growl' | ||
rescue Exception | ||
puts %{ | ||
Autotest/Autospec can use Growl (growl.info|growlforwindows.com) to assist with reporting errors. | ||
This would require Growl for the appropriate platform (MAC|Windows) and the Ruby gem 'karl-autotest-growl' | ||
} | ||
sleep 4 | ||
end | ||
Autotest.add_hook(:initialize) {|at| | ||
at.add_exception %r{^\.git} # ignore Version Control System | ||
at.add_exception %r{^./tmp} # ignore temp files, lest autotest will run again, and again... | ||
at.add_mapping(%r{^lib/.*\.rb$}) {|f, _| | ||
Dir['spec/**/*.rb'] | ||
} | ||
nil | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
## YAML Template. | ||
--- | ||
default: -p base | ||
base: --format rerun --out rerun.txt --format pretty | ||
autotest: --format pretty --color | ||
## YAML Template. | ||
--- | ||
default: -p base | ||
base: --format rerun --out rerun.txt --format pretty | ||
autotest: --format pretty --color | ||
autotest-all: --format pretty --color |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,55 +1,55 @@ | ||
|
||
When /^searching the log for the application '([^']+)'$/ do |name| | ||
@results = Indy.search(@log_source).with(:default).for(:application => name) | ||
end | ||
|
||
When /^searching the log for the log severity (\w+)$/ do |severity| | ||
@results = Indy.search(@log_source).with(:default).for(:severity => severity) | ||
end | ||
|
||
When /^searching the log for the log severity (\w+) and lower$/ do |severity| | ||
@results = Indy.search(@log_source).with(:default).severity(severity,:equal_and_below) | ||
end | ||
|
||
When /^searching the log for the log severity (\w+) and higher$/ do |severity| | ||
@results = Indy.search(@log_source).with(:default).severity(severity,:equal_and_above) | ||
end | ||
|
||
When /^searching the log for the exact match of the message "([^"]+)"$/ do |message| | ||
@results = Indy.search(@log_source).with(:default).for(:message => message) | ||
end | ||
|
||
When /^searching the log for matches of the message "([^"]+)"$/ do |message| | ||
@results = Indy.search(@log_source).with(:default).like(:message => message) | ||
end | ||
|
||
When /^searching the log for the time (.+)$/ do |time| | ||
@results = Indy.search(@log_source).with(:default).for(:time => time) | ||
end | ||
|
||
Transform /^no$/ do |no| | ||
0 | ||
end | ||
|
||
Transform /^(\d+)$/ do |number| | ||
number.to_i | ||
end | ||
|
||
Then /^I expect to have found (no|\d+) log entr(?:y|ies)$/ do |count| | ||
@results.size.should == count | ||
end | ||
|
||
Transform /^first$/ do |order| | ||
0 | ||
end | ||
Transform /^last$/ do |order| | ||
-1 | ||
end | ||
|
||
Transform /^(\d+)(?:st|nd|rd|th)$/ do |order| | ||
order.to_i - 1 | ||
end | ||
|
||
Then /^I expect the (first|last|\d+(?:st|nd|rd|th)) entry to be:$/ do |position,expected| | ||
@results[position].line.should == expected | ||
|
||
When /^searching the log for the application '([^']+)'$/ do |name| | ||
@results = Indy.search(@log_source).with(:default).for(:application => name) | ||
end | ||
|
||
When /^searching the log for the log severity (\w+)$/ do |severity| | ||
@results = Indy.search(@log_source).with(:default).for(:severity => severity) | ||
end | ||
|
||
When /^searching the log for the log severity (\w+) and lower$/ do |severity| | ||
@results = Indy.search(@log_source).with(:default).severity(severity,:equal_and_below) | ||
end | ||
|
||
When /^searching the log for the log severity (\w+) and higher$/ do |severity| | ||
@results = Indy.search(@log_source).with(:default).severity(severity,:equal_and_above) | ||
end | ||
|
||
When /^searching the log for the exact match of the message "([^"]+)"$/ do |message| | ||
@results = Indy.search(@log_source).with(:default).for(:message => message) | ||
end | ||
|
||
When /^searching the log for matches of the message "([^"]+)"$/ do |message| | ||
@results = Indy.search(@log_source).with(:default).like(:message => message) | ||
end | ||
|
||
When /^searching the log for the time (.+)$/ do |time| | ||
@results = Indy.search(@log_source).with(:default).for(:time => time) | ||
end | ||
|
||
Transform /^no$/ do |no| | ||
0 | ||
end | ||
|
||
Transform /^(\d+)$/ do |number| | ||
number.to_i | ||
end | ||
|
||
Then /^I expect to have found (no|\d+) log entr(?:y|ies)$/ do |count| | ||
@results.size.should == count | ||
end | ||
|
||
Transform /^first$/ do |order| | ||
0 | ||
end | ||
Transform /^last$/ do |order| | ||
-1 | ||
end | ||
|
||
Transform /^(\d+)(?:st|nd|rd|th)$/ do |order| | ||
order.to_i - 1 | ||
end | ||
|
||
Then /^I expect the (first|last|\d+(?:st|nd|rd|th)) entry to be:$/ do |position,expected| | ||
@results[position].line.should == expected | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
|
||
Given /^the following log:$/ do |string| | ||
@log_source = string | ||
|
||
Given /^the following log:$/ do |string| | ||
@log_source = string | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
$:.unshift(File.dirname(__FILE__)) unless | ||
$:.include?(File.dirname(__FILE__)) || $:.include?(File.expand_path(File.dirname(__FILE__))) | ||
|
||
require 'indy/indy' | ||
require 'indy/result_set' | ||
$:.unshift(File.dirname(__FILE__)) unless | ||
$:.include?(File.dirname(__FILE__)) || $:.include?(File.expand_path(File.dirname(__FILE__))) | ||
|
||
require 'indy/indy' | ||
require 'indy/result_set' | ||
require 'indy/result' |
Oops, something went wrong.