Displaying 1 result from an estimated 1 matches for "one_spec".
2006 Nov 10
3
Stubbing Time.now in trunk
...:
@time_now = Time.parse("Jan 1 2001")
Time.stub!(:now).and_return(lambda{@time_now})
This gives me some VERY odd errors. For instance, if this is in a
controller spec, and the next line is
get ''index''
I get:
wrong number of arguments (1 for 0)
./spec/controllers/one_spec.rb:9:in `should render the index page''
Line 9 is the get ''index'' line. If I delete that, so there is no next
line, I get:
NoMethodError in ''the test app should render the index page''
undefined method `to_i'' for
#<Proc:0x04a0374c at ./spec...