Because I thought it is the normal way that BDD works. First write the 
Cucumber test and then write the rspec test.
There is nothing that the cucumber test is not covering. 
 
Roelof
 

Op dinsdag 13 november 2012 02:41:42 UTC+1 schreef Alex Chaffee het 
volgende:

> Why do you want to write an rspec test? Is there something your Cucumber 
> test isn't covering?
>
>
> On Nov 12, 2012, at 9:36 AM, roelof <[email protected] <javascript:>> 
> wrote:
>
> Hello, 
>
> I have this step-definitions file:
>
> Given /^a user "(.*?)" exists$/ do |user_name|
>     @user = User.create!(:username => user_name , :password => "tamara")
> end
>
> When /^he logs in$/ do 
>   visit("/login")
>   fill_in('Username', :with => "roelof")
>   fill_in('Password', :with => "tamara")
>    click_button("Login")
> end
>
> Then /^he should see "(.*?)"$/ do |message|
>   page.should have_content(message)
> end
>
> When /^he logs in with a bad password$/ do
>   visit("/login")
>   fill_in('Username', :with => "roelof")
>   fill_in('Password', :with => "roelof")
>    click_button("Login")
> end
>
> Then /^he should not see "(.*?)"$/ do |message|
>     page.should_not have_content(message)
> end
>
> eveything is green here. 
>
> But now I wonder how I can test this using Rspec and have a good rspec 
> file.
> Who can give me some tips ?
>
> Roelof
>
>
>
>
>  -- 
> You received this message because you are subscribed to the Google Groups 
> "rspec" group.
> To post to this group, send email to [email protected] <javascript:>.
> To unsubscribe from this group, send email to 
> [email protected]<javascript:>
> .
> To view this discussion on the web visit 
> https://groups.google.com/d/msg/rspec/-/QaZjSc2gjPAJ.
> For more options, visit https://groups.google.com/groups/opt_out.
>  
>  
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"rspec" 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/rspec/-/MTxcRl_PBUAJ.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to