I've included the output from running my specs with rake spec and
autotest. I've restarted autotest several times to no avail. For
some reason, autotest is missing the newsroom_blog_post specs. Any
idea how to resolve this? I'd like to continue using autotest, but
not if specs are going to be m
On Mar 17, 12:58 pm, ericindc wrote:
> I've included the output from running my specs with rake spec and
> autotest. I've restarted autotest several times to no avail. For
> some reason, autotest is missing the newsroom_blog_post specs. Any
> idea how to resolve this? I'd like to continue usin
I have this route (Rails 3) which handles redirecting shortened urls:
# handles the shortened url lookup
match ':hash' => redirect { |params|
Sharing.get_url_path_by_short_url(params[:hash]) }, :constraints => { :hash
=> /[a-zA-Z0-9]{7}/ }
It works correctly at the ui. However am having troub
Even simpler...
describe 'Show' do
it 'should fail because increment is called' do
Counter.should_not_receive(:increment)# Incorrectly passes
get :show, :count_me => 'true'
end
it 'should fail because increment is not called' do
Counter.should_receive(:increment)# Correct
I'm trying to test a Rails controller and am having trouble getting
SHOULD_NOT_RECEIVE to work on a class method. I can never get
Counter.should_not_receive(:xxx) to fail when the message 'xxx' is sent.
Controller:
def show
@counter = Counter.increment if count_me
end
RSpec:
describe 'Show' do
On Thu, Mar 17, 2011 at 5:25 PM, Pete Campbell wrote:
> I'm trying to test a Rails controller and am having trouble getting
> SHOULD_NOT_RECEIVE to work on a class method. I can never get
> Counter.should_not_receive(:xxx) to fail when the message 'xxx' is sent.
>
> Controller:
> def show
> @coun
On Thu, Mar 17, 2011 at 2:55 PM, Pete Campbell wrote:
> Even simpler...
>
> describe 'Show' do
> it 'should fail because increment is called' do
>Counter.should_not_receive(:increment)# Incorrectly passes
> get :show, :count_me => 'true'
> end
> it 'should fail because increment i
When I run JSpec, in the command prompt, using the "spec" command, I get
this error:
'spec' command not recognized as a command
I have the latest versions of JSpec and Ruby installed. How can I use
the spec command? Not sure what to put in my PATH environment variables.
Thanks!
--
Posted via h
Justin Ko wrote in post #988060:
> I would say "count_me" is not returning what you think it is. Try adding
> "raise count_me.inspect" in the controller action to see if this is the
> case.
Thanks for the feedback. The code snippet isn't the exact code, it is
simplified to demonstrate the proble
On Mar 17, 2011, at 8:24 PM, Pete Campbell wrote:
> Justin Ko wrote in post #988060:
>
>> I would say "count_me" is not returning what you think it is. Try adding
>> "raise count_me.inspect" in the controller action to see if this is the
>> case.
>
> Thanks for the feedback. The code snippet isn
10 matches
Mail list logo