Re: [rspec-users] Testing User Agent

2009-02-25 Thread Suprie Leonhart
On Thu, Feb 26, 2009 at 12:08 PM, Nick Hoffman wrote: > On 25/02/2009, at 9:49 PM, Suprie Leonhart wrote: > >> On Thu, Feb 26, 2009 at 4:39 AM, Nick Hoffman >> wrote: >> >> Hi Suprie. AFAIK, RSpec populates the "request" object in your specs after >

Re: [rspec-users] Testing User Agent

2009-02-25 Thread Suprie Leonhart
On Thu, Feb 26, 2009 at 4:39 AM, Nick Hoffman wrote: > > Hi Suprie. AFAIK, RSpec populates the "request" object in your specs after > a controller action is called. Since your "should know if it's from > blackberry" example doesn't call a controller action, the "request" object > is nil. > -Nick

Re: [rspec-users] Testing User Agent

2009-02-25 Thread Suprie Leonhart
On Wed, Feb 25, 2009 at 10:45 PM, David Chelimsky wrote: > On Wed, Feb 25, 2009 at 3:51 AM, Suprie Leonhart > wrote: > > > > > > On Wed, Feb 25, 2009 at 4:19 PM, David Chelimsky > > wrote: > >> > >> On Wed, Feb 25, 2009 at 1:57 AM, Suprie L

Re: [rspec-users] Testing User Agent

2009-02-25 Thread Suprie Leonhart
On Wed, Feb 25, 2009 at 4:19 PM, David Chelimsky wrote: > On Wed, Feb 25, 2009 at 1:57 AM, Suprie Leonhart > wrote: > > hi > > > > i'm testing some lib i've made for detecting mobile user agent, I > confused > > how to test the lib i&

[rspec-users] Testing User Agent

2009-02-25 Thread Suprie Leonhart
hi i'm testing some lib i've made for detecting mobile user agent, I confused how to test the lib i've made. the test code is [code] describe "Check if mobile browser" do it "should know if it's from blackberry" do blackberry_ua = "BlackBerry8330/4.3.0 Profile/MIDP-2.0 Configuration/