Skip to content
This repository has been archived by the owner on May 25, 2021. It is now read-only.

Commit

Permalink
update acceptance criterion
Browse files Browse the repository at this point in the history
  • Loading branch information
jfredett committed Nov 14, 2011
1 parent 8dcc7cc commit cf013d9
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 0 deletions.
1 change: 1 addition & 0 deletions spec/fixtures/rc
Expand Up @@ -6,6 +6,7 @@ sortah do

router do
raise RuntimeException if email.from && email.from.any? { |e| e =~ /fail/ }
send_to :dynamic => "bar" if email.from && email.from.any? { |e| e =~ /dynamic/ }
send_to :foo
end
end
1 change: 1 addition & 0 deletions spec/fixtures/semantic_acceptance/rc
Expand Up @@ -35,6 +35,7 @@ sortah do
end

router do
send_to :dynamic => "bar" if email.from && email.from.any? { |e| e =~ /dynamic/ }
send_to :personal if email.to.any? { |r| r =~ /jfredett@place.com/ }
send_to :work if email.to.any? { |r| r =~ /joe@work.com/ }
send_to :unknown
Expand Down
8 changes: 8 additions & 0 deletions spec/semantic_spec.rb
Expand Up @@ -373,9 +373,17 @@ def basic_sortah_definition
#shuttup, I can dream.
end

dynamic_email = Mail.new do
to 'joe@work.com'
from 'dynamic@work.com'
subject 'this is a dynamic email'
#shuttup, I can dream.
end

sortah.sort(@email).destination.should == 'new/'
sortah.sort(personal_email).destination.should == 'personal/sarah/new/'
sortah.sort(work_email).destination.should == 'work/brian/new/'
sortah.sort(dynamic_email).destination.should == 'bar'
end
end
end

0 comments on commit cf013d9

Please sign in to comment.