Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

update acceptance criterion

  • Loading branch information...
commit cf013d93073b372a07e93796e154cf933c042b36 1 parent 8dcc7cc
@jfredett authored
View
1  spec/fixtures/rc
@@ -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
View
1  spec/fixtures/semantic_acceptance/rc
@@ -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
View
8 spec/semantic_spec.rb
@@ -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
Please sign in to comment.
Something went wrong with that request. Please try again.