https://rails.lighthouseapp.com/projects/8994/tickets/5805-assert_recognizes-does-not-support-constraints anyone?
On Wed, Nov 24, 2010 at 5:12 AM, jrbruce <jrbr...@gmail.com> wrote: > I'm trying to constrain access to admin routes in my application to > either www or canonical. I need the custom constraint in > root_domain.rb (RootDomain) to handle the canonical part. Since the > subdomains will represent accounts, I don't want /admin available on > any of the subdomains. > > Here is a gist showing exactly how my code and tests are setup: > > https://gist.github.com/712968 > > In the first test, I expect /admin not to be routable on a generic > subdomain (this test currently doesn't pass). However, when I check in > a browser, I receive a not routable error. > > If I remove the custom constraint and use, for example, the :subdomain > => "www" constraint, the test does pass. I've tested both the custom > constraint and the subdomain constraint in my browser and both > restrict access as expected. > > Is this an issue with rspec and how it handles constraints or am I > doing something wrong? > _______________________________________________ > rspec-users mailing list > rspec-users@rubyforge.org > http://rubyforge.org/mailman/listinfo/rspec-users > _______________________________________________ rspec-users mailing list rspec-users@rubyforge.org http://rubyforge.org/mailman/listinfo/rspec-users