- Revision
- 582
- Author
- tastapod
- Date
- 2006-11-26 16:36:34 -0600 (Sun, 26 Nov 2006)
Log Message
[dn] rbehave: updated behaviour method names in BehaviourBehaviour to match _given etc
Modified Paths
Diff
Modified: rbehave/trunk/rbehave/behaviour/behaviour_behaviour.rb (581 => 582)
--- rbehave/trunk/rbehave/behaviour/behaviour_behaviour.rb 2006-11-26 22:18:56 UTC (rev 581) +++ rbehave/trunk/rbehave/behaviour/behaviour_behaviour.rb 2006-11-26 22:36:34 UTC (rev 582) @@ -3,7 +3,7 @@ class BehaviourBehaviour < RBehave::Behaviour # no, really include RBehave - def should_succeed_when_Given_When_Then_invoked_in_correct_order + def should_succeed_when__given__when__then_invoked_in_correct_order _given { @b = Behaviour.new } @@ -17,7 +17,7 @@ } end - def should_fail_in_When_unless_Given_was_invoked + def should_fail_in__when_unless__given_was_invoked _given { @b = Behaviour.new } @@ -29,7 +29,7 @@ } end - def should_fail_in_Then_unless_When_was_invoked + def should_fail_in__then_unless__when_was_invoked _given { @b = Behaviour.new } @@ -41,7 +41,7 @@ } end - def should_fail_if_Given_is_invoked_more_than_once + def should_fail_if__given_is_invoked_more_than_once _given { @b = Behaviour.new @b._given {} @@ -54,7 +54,7 @@ } end - def should_fail_if_When_is_invoked_more_than_once + def should_fail_if__when_is_invoked_more_than_once _given { @b = Behaviour.new @b._given {} @@ -68,7 +68,7 @@ } end - def should_fail_if_Then_is_invoked_more_than_once + def should_fail_if__then_is_invoked_more_than_once _given { @b = Behaviour.new @b._given {}; @b._when {}; @b._then {} @@ -98,7 +98,7 @@ class WhenFailed < StandardError; end class ThenFailed < StandardError; end - def should_report_exception_from_Then_block_if_When_and_Then_both_fail + def should_report_exception_from__then_block_if__when_and__then_both_fail _given { @b = Behaviour.new @b._given{} @@ -112,7 +112,7 @@ } end - def should_reraise_exception_in_Then_block_if_When_failed_with_an_unexpected_error + def should_reraise_exception_in__then_block_if__when_failed_with_an_unexpected_error _given { @b = Behaviour.new @b._given{}
Modified: rbehave/trunk/rbehave/describe.rb (581 => 582)
--- rbehave/trunk/rbehave/describe.rb 2006-11-26 22:18:56 UTC (rev 581) +++ rbehave/trunk/rbehave/describe.rb 2006-11-26 22:36:34 UTC (rev 582) @@ -11,7 +11,7 @@ eval <<-EOM def #{subclass}.method_added(id) # intercept behaviour methods meth = id.to_s - printf("- %s\n", meth.gsub(/_/, ' ')) if meth =~ /^should/ + printf("- %s\n", meth.gsub(/(\\w)_/, '\\1 ')) if meth =~ /^should/ end EOM end
To unsubscribe from this list please visit:
