Hello everybody !

I have in a view something like this :


<% unless (method_name?(id)) then %>
        <span class="active">
            <%= link_to h(t(:BTN)), new_url_path(id) %></span>
         </span>
<% else %>
        <span class="Notactive">
                <%= link_to_function h(t(:BTN)), 'return false;' %>
        </span>
<% end %>


all of this works well ...

and in my spec I try to do this to go in the else part :

@controller.template.stub!(:get_courtier_expire?).and_return (false)



I tried a lot of combinations like ...

@template.stub!(
template.stub!(
@controller.template.should_receive(
template.should_receive(

and it does'nt work ... it always goes in the if not in the else
part ... any suggestions ?
_______________________________________________
rspec-users mailing list
rspec-users@rubyforge.org
http://rubyforge.org/mailman/listinfo/rspec-users

Reply via email to