The way I've started using story runner is to write the story and
scenarios, and then implement each step incrementally. The order that
I implement is not necessarily the order its logically written. Lets
say I want to get the story working without the authentication, so a
Given clause and
I think I asked to quickly.
I'm guessing its
template.expect_render(:partial => 'games', :collection => @games)
On 10/1/07, Andrew WC Brown <[EMAIL PROTECTED]> wrote:
>
> How about specing partial collections?
>
> it "should render a list of games for authenticated users" do
>template.stub!
I just used the response text
On 10/1/07, Jonathan Linowes <[EMAIL PROTECTED]> wrote:
>
> hi,
>
> is there a way to assert a flash message directly in story runner? Or
> do I have to go through the response text instead.
>
> Then "flash message should say success" do
>#flash[:
hi,
is there a way to assert a flash message directly in story runner? Or
do I have to go through the response text instead.
Then "flash message should say success" do
#flash[:notice].should == "User successfully invited"
response.should have_text(/User successful
On 10/1/07, Andrew WC Brown <[EMAIL PROTECTED]> wrote:
> Specing Image Tags?
>
> it "should show a propaganda image" do
>render "/games/index.rhtml"
>response.should have_tag('img','signup_propaganda.gif')
> end
>
> The following doesn't work. Im guess have_tag isnt the best approach to
On 10/1/07, Andrew WC Brown <[EMAIL PROTECTED]> wrote:
> Specing Image Tags?
>
> it "should show a propaganda image" do
>render "/games/index.rhtml"
>response.should have_tag('img','signup_propaganda.gif')
> end
>
have_tag expect 'tag' and 'content'...
There was a previous discussion o
Specing Image Tags?
it "should show a propaganda image" do
render "/games/index.rhtml"
response.should have_tag('img','signup_propaganda.gif')
end
The following doesn't work. Im guess have_tag isnt the best approach to test
them.
Should I just use have_text and look for the img and sign
Thanks guys, I appreciate it.
Mike B.
This message was sent using IMP, the Internet Messaging Program.
___
rspec-users mailing list
rspec-users@rubyforge.org
http://rubyforge.org/mailman
I solved it.
The two problems were that I named my paths wrong and I was calling template
instead of repsonse
it "should have a create games link for admin" do
template.stub!(:logged_in?).and_return(true)
template.stub!(:admin?).and_return(true)
render "/games/index.rhtml"
response.
Well I figured out why it didn't understand what the route was.
it was new_games_path when it should have been new_game_path.
Still not sure about the anchor tag
On 10/1/07, Andrew WC Brown <[EMAIL PROTECTED]> wrote:
>
> I had reinstalled the plugin yesterday but I reinstalled it and its
> revis
I had reinstalled the plugin yesterday but I reinstalled it and its revision
2680
It still gives me the error.
On 10/1/07, David Chelimsky <[EMAIL PROTECTED]> wrote:
>
> On 10/1/07, Andrew WC Brown <[EMAIL PROTECTED]> wrote:
> > 1.0.9
>
> That's not been released, so you must be working from trunk
I think you mean trunk... (since 1.0.8 is the current release and it
does not contain the sorry runner.) Why can't you use svn?
Anyways.. I grabbed the latest version of trunk and tarred it up for you:
http://www.cs.utah.edu/~benjamim/rspec_trunk.tar.bz
-Ben
barsalou wrote:
> Anyone willing to
2007/10/1, Jarkko Laine <[EMAIL PROTECTED]>:
> On 1.10.2007, at 18.25, Jesper Laursen wrote:
> > Okay, now it seems til work.
> > The problem has what I have to place:
> > @domain.virtual_hosts.should_receive(:find).with
> > ("1").and_return(@virtual_host)
> > in the before, because the "do_g
On 10/1/07, barsalou <[EMAIL PROTECTED]> wrote:
> Anyone willing to tar me up the 1.0.8 of rspec and rspec_on_rails?
>
> I'm interested in giving the story runner stuff a try.
1.0.8 doesn't have the story runner in it. I just posted a tar of the
current trunk here:
http://blog.davidchelimsky.net/
Anyone willing to tar me up the 1.0.8 of rspec and rspec_on_rails?
I'm interested in giving the story runner stuff a try.
I really got to get svn going somehow.
Mike B.
This message was sent using IMP, the Internet Messaging Progr
Hi Jonathan.
The pending method uses an exception to fail fast out of the step, but the
runner knows it's a special case so it treats it accordingly. That's why
pending steps or scenarios are reported differently from failures in the
runner. It would be easy to reimplement pending using Ruby's thr
On 10/1/07, Andrew WC Brown <[EMAIL PROTECTED]> wrote:
> 1.0.9
That's not been released, so you must be working from trunk. I don't
think, however, you have the latest trunk because I *think* this has
been fixed.
Try updating (per
http://rspec.rubyforge.org/documentation/rails/install.html near t
1.0.9
On 10/1/07, David Chelimsky <[EMAIL PROTECTED]> wrote:
>
> On 10/1/07, Andrew WC Brown <[EMAIL PROTECTED]> wrote:
> > How about spec'ing links?
> >
> > <%= link_to 'Create new game', new_games_path %>
> >
> > it "should have a create games link for admin" do
> >template.stub!(:logged_i
On 10/1/07, Andrew WC Brown <[EMAIL PROTECTED]> wrote:
> How about spec'ing links?
>
> <%= link_to 'Create new game', new_games_path %>
>
> it "should have a create games link for admin" do
>template.stub!(:logged_in?).and_return(true)
> template.stub!(:admin?).and_return(true)
>templ
How about spec'ing links?
<%= link_to 'Create new game', new_games_path %>
it "should have a create games link for admin" do
template.stub!(:logged_in?).and_return(true)
template.stub!(:admin?).and_return(true)
template.should have_tag('a','Create new game')
render "/games/index.rht
If you add the pending statement before other non-pending ones, it
stops at the first pending one. That forces me to implement them in
the order specified, a rough example:
Then "user was authorized to perform this action"
And "action was completed correctly" do
...
end
On Sep 14,
This is fixed in trunk.
On 10/1/07, Geoffrey Wiseman <[EMAIL PROTECTED]> wrote:
> When I've got a view example like this:
>
> 1: response.should have_tag "fieldset#children" do
> 2: with_tag "child"
> 3: end
>
> If it can't find 'child', the error seems to come back as my_spec.rb:1
> instead of m
When I've got a view example like this:
1: response.should have_tag "fieldset#children" do
2: with_tag "child"
3: end
If it can't find 'child', the error seems to come back as my_spec.rb:1
instead of my_spec.rb:2.
Has anyone else experienced this? I just spent a while tracking down what I
ass
On 1.10.2007, at 18.25, Jesper Laursen wrote:
> Okay, now it seems til work.
> The problem has what I have to place:
> @domain.virtual_hosts.should_receive(:find).with
> ("1").and_return(@virtual_host)
> in the before, because the "do_get" method was using it, in all it-
> blocks.
>
> I ju
I'm trying to write my first view spec; I've done some controller specs with
integrated views, but thought that isolating the views for some of these
tests might be nice.
So I wrote this:
> describe PlayerContainer, "show" do
>
> PARENT_ID = 12
> CHILD_NAME = 'Child Name'
> PARENT_NAME = 'P
2007/10/1, Ryan Tucker <[EMAIL PROTECTED]>:
> Jesper Laursen wrote:
> > 2007/9/30, Ryan Tucker <[EMAIL PROTECTED]>:
> >
> >> Jesper Laursen wrote:
> >>
> >>> Hello forum
> >>>
> >>> I have there to files
> >>>
> >>> #- virtual_host_controller.rb
> >>> class VirtualHostsController < ApplicationC
Hans that did it!
Thanks for that one!
Cheers!
sinclair
On 9/25/07, Hans de Graaff <[EMAIL PROTECTED]> wrote:
>
> On Fri, 2007-09-14 at 17:51 -0400, sinclair bain wrote:
> >
> > def update
> > ...
> > if @config.update_attributes ( params[:new_config] )
> > redirect_to :action => :
Living and learning !
Cheers for that David!
Cheers!
sinclair
On 9/28/07, David Chelimsky <[EMAIL PROTECTED]> wrote:
>
> On 9/28/07, sinclair bain <[EMAIL PROTECTED]> wrote:
> > Hi,
> >
> > I have the following example:
> >
> >
> > it 'should have a form with an action attribute' do
> > r
On 10/1/07, Andrew WC Brown <[EMAIL PROTECTED]> wrote:
> It didn't know what controller was, should it not know it what it is by
> default or do I have to assign a controller at the top of my spec?
Try template instead, or @controller.
The controller used in view specs is a generic controller tha
It didn't know what controller was, should it not know it what it is by
default or do I have to assign a controller at the top of my spec?
On 10/1/07, Andrew WC Brown <[EMAIL PROTECTED]> wrote:
>
> The was really helpful, thanks David!
>
> "There is no simple answer to your question. If anyone off
The was really helpful, thanks David!
"There is no simple answer to your question. If anyone offers you one,
treat it with a grain of salt."
The game I'm specing actually has an attribute called grains_of_salt.
No Lie.
On 10/1/07, David Chelimsky <[EMAIL PROTECTED]> wrote:
>
> On 10/1/07, Andre
On 10/1/07, Andrew WC Brown <[EMAIL PROTECTED]> wrote:
> I'm trying to spec a view but haven't done much view specing.
>
> This view render different partials depending on authentication of the user:
> annon, admin, player
> So I I'll write if conditionals in the view with the partials
>
>
> it "
On 9/30/07, Andrew WC Brown <[EMAIL PROTECTED]> wrote:
> I reinstalled the plugins and generated rspec but still doesn't work.
What is the path to the spec that you're changing?
>
>
> On 9/30/07, Scott Taylor <[EMAIL PROTECTED] > wrote:
> >
> > On Sep 30, 2007, at 3:05 AM, Andrew WC Brown wrote:
33 matches
Mail list logo