[rspec-users] Can someone clarify this RSpec block?

2012-02-23 Thread Mohamad El-Husseini
I'm new to RSpec, Rails, and Ruby. I'm following the Rails Tutorial. I was going over some RSpec code and go wanted some clarification: describe "User pages" do subject { page } describe "sign up" do describe "with valid information" do before do fill_in "Name", with: "

[rspec-users] Can anyone tell me why this test is failing?

2012-02-29 Thread Mohamad El-Husseini
I ran this scenario in the console and it works as expected. But RSpec keeps failing the test and I can't understand why. describe User do before do @user = User.new(name: "Mickey Mouse", email: "mic...@disney.com", password: "m1ckey", password_confirmation: "m1ckey") end # Passwor

Re: [rspec-users] Can anyone tell me why this test is failing?

2012-02-29 Thread Mohamad El-Husseini
, Justin Ko wrote: > > > On Feb 28, 2012, at 9:43 PM, Mohamad El-Husseini wrote: > > > I ran this scenario in the console and it works as expected. But RSpec > keeps failing the test and I can't understand why. > > > > describe User do > > > >

[rspec-users] Can some one please explain why one of those two examples fails?

2012-03-13 Thread Mohamad El-Husseini
The following are what I believe two ways of doing the same thing. Only the first example fails, while the latter passes. I'm finding it hard to get to understand describe and context blocks, particularly with respect to scopes. I would appreciate any "for dummies" explanation, or a link to a b

Re: [rspec-users] Can some one please explain why one of those two examples fails?

2012-03-15 Thread Mohamad El-Husseini
use, the first, that was broken, or the second? On Tuesday, March 13, 2012 9:24:03 PM UTC-3, Mike Mazur wrote: > > Hi, > > On Wed, Mar 14, 2012 at 07:55, Mohamad El-Husseini > wrote: > > The following are what I believe two ways of doing the same thing. Only > the >