On Sun, Aug 14, 2011 at 3:48 PM, John Hinnegan wrote:
>
>>
>>
>> I was trying to stub something "globally", across all tests today, and had
>> some trouble.
>>
>> I tried
>>
>> RSpec.configure do |config|
>> config.before(:all
Thanks, cheers
On Sun, Aug 14, 2011 at 8:17 PM, David Chelimsky wrote:
> On Aug 14, 2011, at 10:15 PM, Justin Ko wrote:
>
> On Sun, Aug 14, 2011 at 3:48 PM, John Hinnegan wrote:
>
>>
>>
>> I was trying to stub something "globally", across all tests today
I was trying to stub something "globally", across all tests today, and had
some trouble.
I tried
RSpec.configure do |config|
config.before(:all) do
MyClass.stub(:my_method)
end
end
seems that stub is not available here yet. (I was stubbing a class method,
and the class was loaded correc
I would like to turn this:
describe TestClass do
before :all do
# set some config
end
after :all do
# restore some config
end
# do a bunch of tests to this
end
into
describe TestClass do
with_config_value(X)
# do a bunch of tests to this
end
Basically, I want to include before :all and after
So, you start running your (full and long) rspec suite (before a checkin),
and you realize you [forgot to migrate test|didn't add some config
value|missed a curly brace].
You hit Ctrl+C and get this mesage
Exiting... Interrupt again to exit immediately.
Then the tests march on.
My question is, do
So, maybe I need to go to the rails list with this, but I hit my error while
testing so I figured I'd ask here first.
Basically, Rails.cache.fetch is being persisted by default in my rails
project between rspec runs. I've illustrated what I'm observing here:
https://github.com/softwaregravy/rspe
I'm testing methods in my ApplicationController using anonymous controller
class (not sure if that's relevant). I've somehow broken something such
that I do not have access to the routing variables that rails generates.
So rather than having something like 'response.should redirect_to
new_user_se