I have a fix to SslRequirement that allows you to exclude user-
specified domain names. It's quite likely that you won't want to use
SSL on some machines when in development. In any case, I have a bear
of a time with the Rails Test::Unit setup so that part's missing, but
look over:
http://github.com/sxross/ssl_requirement/tree/master
Cheers
On Feb 14, 2009, at 8:05 AM, James Byrne wrote:
Wincent Colaiuta wrote:
# always return false for tests
return false if RAILS_ENV == 'test'
I brand this as "hideous" because it commits the heinous crime of
dynamically modifying application behaviour only when execution
within
the testing context is detected. Ugh.
For the time being, though, looks like the only way to get my
Cucumber
features working. At least until I find out a better way.
Cheers,
Wincent
I am reluctant to go forward on this because I have not yet dealt with
this problem first hand. However, I looked into this issue briefly in
the past and it seemed to me that the behaviour you wish to test might
be triggered by setting one or more of the following environment
variables. Since you can set these outside your application code then
this might satisfy your desire to avoid custom test code therein.
It appears that either one of these is sufficient by itself:
HTTPS = ‘on’
HTTP_X_FORWARDED_PROTO = ‘https’
I read somewhere that this one might prove necessary in addition to
the
foregoing.
HTTP_X_FORWARDED_SSL = ‘on’
As I wrote, I have not tested any of this.
--
Posted via http://www.ruby-forum.com/.
_______________________________________________
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