Op zondag 4 november 2012 21:25:15 UTC+1 schreef Colin Law het volgende:
>
> On 4 November 2012 18:46, roelof <[email protected] <javascript:>> 
> wrote: 
> > 
> > Op zondag 4 november 2012 18:52:46 UTC+1 schreef Colin Law het volgende: 
> >> 
> >> On 4 November 2012 17:45, Roelof Wobben <[email protected]> wrote: 
> >> > ... 
> >> > Message come from here. 
> >> > 
> >> > Then he should see "Welcome, Aslak" 
> >> > 
> >> > Then /^he should see "(.*?)"$/ do |message| 
> >> > @output.messages.should include (message) 
> >> > end 
> >> 
> >> I have no idea what you are saying now.  Is this a different problem? 
> >> If so then again post the error message and the relevant code.  Just 
> >> put the code inline here unless it is long, it is easier to comment 
> >> here than if you have put it somewhere else.  You only need to post 
> >> the relevant 10 or 20 lines. 
> >> 
> >> Colin 
> > 
> > 
> > No I try to answer where message is coming from. 
> > Message is as I understand from the step-definition and should include 
> the 
> > text "Welcome asLak" 
>
> Sorry, you still have not explained the problem.  Explain what is 
> happening, 

 
What happen is that I see the error message.
 

> what should be happening

 
What schould be happen is that the message "Welcome Aslak" is being seen as 
the user Aslak is loggin in succesfull. 
 
 

> , and show us the code that should 
> do what you expect.  
>
 
I will give you the cucumber code.
 
 
Scenario: log in as existing user
Given a user "[email protected]" exists
When he logs in
Then he should see "Welcome, Aslak"
 
step-definition part : 
 
 
class Output
def messages
@messages ||= []
end
 def puts(message)
messages << message
end
 def output
@output ||= Output.new
end
end
 
Then /^he should see "(.*?)"$/ do |message|
@output.messages.should include (message)
end
 
 
Roelof
 

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msg/rubyonrails-talk/-/hNTRYHMhxdkJ.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to