Displaying 2 results from an estimated 2 matches for "important_value".
2007 Oct 04
0
Module + Constant Issue
...ls app, e. g. $ rails constant
2) Edit the environment.rb file to add your own module with
configuration constant default values with the idea you could
"override" these by specifying them in the specific environment file:
At the end of config/environment.rb, add:
module AppConstants
IMPORTANT_VALUE = "x" unless defined?(AppConstants::IMPORTANT_VALUE)
end
3) Create a Ruby module in the file lib/app_constants/list.rb, noting
the "top level" name of the module matches the one specified in the
environment file:
module AppConstants
module List
LIST_CONSTANT = "list...
2006 Oct 06
8
Expecting calls with two different parameters
Hello,
I''ve just started using Mocha in the tests for my Rails app, and I''ve
run across an issue with mocking a method that should be called with
different parameters.
How would I setup a mock that expects that a method will be called
once with no paramaters, and a second time with a parameter? I''d be
tempted to shortcut and just do something like