On Oct 20, 2010, at 9:56 PM, oren wrote:
> I am specing a sinatra app.
>
> it "should send non-valid user to /login" do
> get '/'
> last_response.headers['Location'].should == '/reports'
> end
>
> this is working fine but I would like to know how to convert it to the
> new syntax or if there i
I am specing a sinatra app.
it "should send non-valid user to /login" do
get '/'
last_response.headers['Location'].should == '/reports'
end
this is working fine but I would like to know how to convert it to the
new syntax or if there is a better way to do that.
before(:each) { get '/' }
subj
thanks!
On Oct 20, 4:55 am, David Chelimsky wrote:
> On Oct 19, 2010, at 9:15 PM, oren wrote:
>
> > I try to test sinatra app using rspec 2.0.0 and rack-test 0.5.6
>
> > it "redirect non-authenticated user to logout page" do
> > get '/'
> > last_response.should be_redirect_to('/login)
> >
Thanks for all the replies and the help.
On Tue, Oct 19, 2010 at 9:08 PM, David Chelimsky wrote:
> On Oct 19, 2010, at 2:04 PM, Pat Maddox wrote:
>
> > On Oct 19, 2010, at 12:56 AM, Oscar Del Ben wrote:
> >
> >> I'm having some troubles understanding how to test a couple of things.
> Usually, if
On Oct 19, 2010, at 7:07 PM, Trey wrote:
> I'm sure something is borked in my app, but I can't seem to track it
> down.
Me too, and routing as well ...
constraints( :subdomain => /.+/ ) do
match '/dashboard' => 'users#show'
end
it "routes 'http://test.example.com/dashboard' to Users