Skip to content

Commit

Permalink
More matching tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Ryan Burrows committed Jun 30, 2010
1 parent 9a74851 commit a3b257b
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 1 deletion.
2 changes: 1 addition & 1 deletion Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ begin

namespace :cucumber do
Cucumber::Rake::Task.new(:ok) do |t|
t.cucumber_opts = "--format pretty -t ~@wip"
t.cucumber_opts = "--format progress -t ~@wip -b"
end

Cucumber::Rake::Task.new(:wip) do |t|
Expand Down
23 changes: 23 additions & 0 deletions features/match_fields.feature
Original file line number Diff line number Diff line change
Expand Up @@ -51,4 +51,27 @@ Feature: jse matches specific fields within the json
"""

Scenario: Regexp match on multiple fields
When I run "jse level:/O$/ message:/^line/" on my log file
Then I should see:
"""
{"level":"INFO","message":"line one"}
{"level":"INFO","message":"line four"}
"""
But I should not see:
"""
{"level":"DEBUG","message":"line two"}
{"level":"ERROR","message":"number three"}
"""

Scenario: Both Exact an Regexp match in one
When I run "jse level:/INFO/ message:/^line/" on my log file
Then I should see:
"""
{"level":"INFO","message":"line one"}
{"level":"INFO","message":"line four"}
"""
But I should not see:
"""
{"level":"DEBUG","message":"line two"}
{"level":"ERROR","message":"number three"}
"""
2 changes: 2 additions & 0 deletions features/support/env.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
$:.unshift 'lib'
require 'fileutils'

require 'jse'
require 'jse/cli'

Expand Down

0 comments on commit a3b257b

Please sign in to comment.