Good question. One answer is that it can change, it just needs a code change
and application restart.

Basic business case is that someone will set the postage threshold before
the application is deployed. However they could choose any value. So I want
to test what happens when the application is setup with different values
e.g. zero because all postage is free and £30 cos postage is free if you
spend £50 or more.

Currently we do not want to do form based admin for this setting (and
similar ones) because such a change would be very infrequent, so we are
currently happy to redeploy to make the change.

2009/4/27 aslak hellesoy <aslak.helle...@gmail.com>

>
>
> On Mon, Apr 27, 2009 at 2:00 PM, Andrew Premdas <aprem...@gmail.com>wrote:
>
>> Currently I have a very simple constants implementation being loaded as a
>> Rails initialiser
>>
>> module MVOR
>>   module Postage
>>     THRESHOLD = BigDecimal.new('6.99')
>>     RATE = BigDecimal.new('30.00')
>>   end
>> end
>>
>>
>> My scenarios of my postage feature want to deal with two situations when
>> the THRESHOLD has been set to zero and to '6.99'. The question is how can I
>> set the threshold in my step_definition. So I want to implement
>>
>>   Given the postage threshold is 0.00
>>   Given the postage threshold is 6.99
>>
>>
> Since it's a constant - how can it possibly change? And therefore - why are
> you testing it with different values?
>
>
>>
>>  I've considered a number of ideas, but seem to keep on getting into
>> complex solutions for what I assume is something very simple.
>>
>> TIA
>>
>>
>> _______________________________________________
>> rspec-users mailing list
>> rspec-users@rubyforge.org
>> http://rubyforge.org/mailman/listinfo/rspec-users
>>
>
>
> _______________________________________________
> rspec-users mailing list
> rspec-users@rubyforge.org
> http://rubyforge.org/mailman/listinfo/rspec-users
>
_______________________________________________
rspec-users mailing list
rspec-users@rubyforge.org
http://rubyforge.org/mailman/listinfo/rspec-users

Reply via email to